Hi Michael,

Thx for your answer: About your feedback:

Current situation: I moved back to my working apache 2 / mysql 4.0/ php 4.3 
installation after trying to compile mysql 4.1 from source this afternoon. 
Which (after following the guidelines on mysql.com) returned in an error in 
the configure process (no temcap functions library found). I was able to 
compile php5 / apache 2 from source, but wouldn't take the risk so I switched 
back.

> As a side note, I'm not sure what you mean by "not possible".  Rewriting
> subqueries as joins is usuallly not that difficult, and joins are often
> faster.

With not "possible", I meant "not capable" ;-) But you says it right: "usually 
not that difficult". I do not consider myself as an expert, but usually I'm 
able tor rewrite my subqueries as joins, anyway not in this case. But this is 
actually not an issue. I still want to move forward to mysql 4.1.

> Hence this copy of php is linked against the mysql 4.0 client library,
> which does not support the improved authentication protocol added in mysql
> 4.1. One option would be to build your own php from source, linking against
> your newly installed mysql 4.1 client library.

Questions:
A] When I compile php from source, should I remove the old rpm's first that 
came with the installation of my suse 9.1 distro? Or can I leave it the way 
it is?
-b] Can I just compile php 5 or would that cause any new troubles? Or would it 
be better to use php 4 (for me it's either right now, but I can image that I 
want to use the new OO-tools from php 5).
C] When you say link php against mysql 4.1 client library; does I see it right 
that this needs to be done while building php? Or can I still do this 
afterwards? It should be something like (found this on builder.com)

$ ./configure --prefix=/usr/local/php5 
--with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/local/lib 
--with-zlib --with-zlib-dir=/usr/local/lib --with-mysql=/usr/local/mysql 
--with-mysqli=/usr/local/mysql/bin/mysql_config --with-gd --enable-soap 
--enable-sockets

D] Any other ideas of what I have take care off?

> Same error.  Mysql believes you did not specify a password in
> mysql_connect().

Idd. Eventhough I did ;)

> It appears so far that mysql 4.1 is running fine.  Your problems seem to be
> with php, your script, and failure to use passwords when connecting.

1/ To my believe, my script works fine as it is the basic way to connect to 
mysql. At least, I use that script since decades ;)
2/ MySQL 4.1 is running fine indeed, as far as I can see, because I was able 
to connect to phpmyadmin and create new db/users/tables with it.
3/ I hope that installing php from source would be a solution.

Best regs and thx,

Rik

Op maandag 11 oktober 2004 00:44, schreef Michael Stassen:
> rik wrote:
> > Hello all
> >
> > Sitting stuck in an upgrade to mysql 4.1, I thought this mailing list
> > would be a good idea to get help.
> >
> > I've a php4/mysql application developed on a windows xp machine. Right
> > now I want to migrate this app to my linux machine. Since the app uses
> > subqueries, I need to upgrade MySQL on my linux machine from 4.0 to 4.1.
> > Subqueries vs joins is not an issue, since it's (at least for me and some
> > other developers not possible).
>
> As a side note, I'm not sure what you mean by "not possible".  Rewriting
> subqueries as joins is usuallly not that difficult, and joins are often
> faster.
>
> > My machine is a very recent pc running SUSE 9.1 pro. MySQL was running
> > fine so far, with no problems at all. Since upgrading to 4.1 on XP was as
> > simple as installing the new 4.1 server and client, I tried to do it the
> > same way on Linux. Without success.
> >
> > 1]So I decided to reinstall suse from cd, without any mysql but with a
> > working apache2/php 4.3 configuration (tested and ok).
> >
> > 2]I've downloaded the mysql 4.1.5 rpm's from mysql.com
> >
> >     MySQL-client-4.1.5-0.i386.rpm
> >     MySQL-server-4.1.5-0.i386.rpm
> >     MySQL-shared-4.1.5-0.i386.rpm
> > 3]Command line installation like rpm --install -v -h MySQL*.rpm
> >
> > 4]Installed phpmyadmin, and I was unable the start it getting the error
> > that php-mysql was missing. Installed php-mysql via Yast from the
> > suse-cd, but Yast wants allways to install the MySQL-shared-4.0 with it
> > (depen.).
>
> Hence this copy of php is linked against the mysql 4.0 client library,
> which does not support the improved authentication protocol added in mysql
> 4.1. One option would be to build your own php from source, linking against
> your newly installed mysql 4.1 client library.
>
> > 5]Once MySQL-shared-4.0 was installed, I was still not able to connect to
> > phpmyadmin getting the error " Access denied for user
> > 'tour'@'localhost' (using password: NO). That moment I was able to type
> > in the command line
> > shell> mysql
> >
> > 6]On http://dev.mysql.com/doc/mysql/en/Old_client.html I found this
> > solution: Reset the password to pre-4.1 style for each user that needs to
> > use a pre-4.1 client program. This can be done using the SET        PASSWORD
> > statement and the OLD_PASSWORD() function:
> >
> >             mysql> SET PASSWORD FOR
> >                     -> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
> > which I did.
>
> OK
>
> > 7]From that moment on I was able to connect to phpmyadmin (using the
> > proper password in the phpmyadmin config file) and do some database
> > stuff.
> >
> > 8]But from the same moment, when I want to type in the commandline
> >
> >             linux> mysql
> > It returns this error in the command line
> >
> >             linux:~ # mysql
> >             ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> > password: NO)
>
> Look at the error message.  It says, "using password: NO".  You need the
> password to connect.  Try
>
>    linux> mysql -p
>
> from the command line.  You'll be prompted for your password.
>
> > Since I was able to store my application data through phpmyadmin in a db,
> > I've tried to run my application in my browser, but it returns the error:
> >
> >             Warning: mysql_connect(): Access denied for user '...'@'localhost'
> > (using password: NO)
> > in /home/.../public_html/application_0.4/scripts/connections/connect.php
> > on line 9
>
> Same error.  Mysql believes you did not specify a password in
> mysql_connect().
>
> > Which means to my opinion that users don't have access (even new created
> > mysql users and after changing the user values in the connection script
> > from my app).
> >
> > 9] MySQL.com says how to reset password stuff and so on, but therefore
> > I've to type in the command line >mysql, which returns an error (see 8).
> >
> > My wish: running mysql 4.1 without problems.
>
> It appears so far that mysql 4.1 is running fine.  Your problems seem to be
> with php, your script, and failure to use passwords when connecting.
>
> > My question: does anyone recognizes the above problems? Can anybody give
> > me an insight on what I do wrong, how I can run it smoothly?). Would
> > really appreciate help (and I believe with me many others with the same
> > problem, since googling many hours didn't give me the right answer).
> >
> > Thanks,
> >
> > Rik
>
> Michael

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to