View Full Version : problems with new version of MySQL

02-24-2005, 01:58 PM
hi, my appologies if this problem is addressed in another post. i couldn't seem to find it if it is. so here's my problem:
i have two different server accounts with Westhost, one with MySQL4 and one with MySQL3. The account with MySQL3 uses a script like below (which works fine) to connect to the DB:

$db = @mysql_connect($DBhost, $DBuser, $DBpass);

print "error connecting to localhost";

print "error selecting db";

however, on the server with MySQL4, i get the "error connecting to localhost" output. or, if i use the Any user with no password:
it connects but gives me the "error selecting db" output

i use PhpMyAdmin to set up my users on both systems and have tried adding new users to get around this. is there something different i need to do for connecting with MySQL4? any help is greatly appreciated.

02-24-2005, 02:16 PM
p.s. - i've noticed that with no user/pass, i can connect to the 'test' DB, but not another DB i've created. the users i've created have global permissions so if i can connect to one DB, why not the other?

02-24-2005, 05:21 PM
I have similar scenario and script (vps using 3 and a vps using 4 with similar scripts), working fine.

I gather the test using PerlMysql 1.1 on the vps using 4 gave an ok (the test db) so perl libraries should be ok.
Is that right? otherwise I would suspect a missing dbi module. you might want to compare httpd on both VPS.

Your code is simple enough, can't be the problem between mysql3 and 4.
Beyond that, only thing I can think of is re-check the host/user/pw used, and that your computer is plugged in properly :)

maybe others have ideas...........

02-24-2005, 08:09 PM
Did you try using the "root" user on mySql 4?

mySql 4 uses a different password method than mySql 3 and the new PHP installation is using the V3 client.
There is a command here somewhere on how to force mySql 4 to use the old password method. I have not tryed it.

For me, the "root" user is the only one that works.

02-25-2005, 10:48 AM
The password problem was posted about in this thread (http://forums.westhost.com/phpBB2/viewtopic.php?t=2679&postdays=0&postorder=asc&star t=0).

You can change an account's password to the old style with this mysql command:

-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

I created a couple new accounts after upgrading to MySQL 4, and this fixed the password problem on all of them.

02-26-2005, 07:13 PM
well, it worked. thanks! i had seen that post but didn't think that was my problem. i guess i really dont understand how the users are handled differently.

so, do i need to do this everytime i create a new user in PhpMyAdmin? if so that seems a bit rediculous.