Page 1 of 1

- SOLVED - Same old Authentication problem - SOLVED -

Posted: Thu Jan 26, 2006 8:23 am
by mhouldridge
Hi,

I have installed mysql 4.1 on to my computer (windows xp pro). Again I have the following error when connecting through my php script,

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in F:\Auditwebsite\checkuser.php on line 5
Problem connecting

Previously I used the following command within mysql to correc this;
mysql>SET PASSWORD FOR "something@localhost" = OLD_PASSWORD("something");

However this time I get the following error;
Error 1133 - Cant find any matching row in user table

Now I know this error usually means that it doesnt exist however I have checked my db within mysql admin and can see the user there fine.

I have also tried doing this on the root user which lets me in on the admin, however the same error comes up.


Please help!

Posted: Thu Jan 26, 2006 8:49 am
by mhouldridge
Just updated php to the latest version however now Im getting;

Call to undefined function mysql_connect

!!!!???

This works on my other server.... Im stumped!

Posted: Thu Jan 26, 2006 8:56 am
by JayBird
you using PHP5?

Posted: Thu Jan 26, 2006 9:09 am
by mhouldridge
Yep.

I dont think it is connecting to my database correctly.

Posted: Thu Jan 26, 2006 9:14 am
by JayBird
The compiled Windows binaries (what you download off php.net) no longer have MySQL enabled by default. Instead, you need to take the following steps during setup:

a) Enable php_mysql.dll in php.ini Be 100% certain you are editing the proper php.ini*
b) Be sure to copy the libmySQL.dll from the dll/ folder to the location install.txt asks you to move all dll's in dll/ to. This is the step most miss. Essentially it needs to be available to your systems PATH which ideally you'll edit your Windows system PATH environment variable to include the PHP dir. Doing so would however require a reboot of Windows but in the end is worth it as it means all PHP files are in ONE directory so upgrades are easy.
c) Restart web server
d) Further problems? Read the manual.
* http://php.net/manual/en/install.windows.manual.php
* http://php.net/manual/en/faq.installation.php

Posted: Thu Jan 26, 2006 9:22 am
by mhouldridge
Downgraded back to version 4 now, however getting the authentication issue again.

I cleared this up no probs last time with the SET PASSWORDS = OLD command....

argh!


Just get cant find matching row in user table. This is bizarre. If I were an expert I would say this is a bug, but im not, so I wont.

Posted: Thu Jan 26, 2006 10:06 am
by Jenk

Code: Select all

SET PASSWORD FOR `user`@`domain` = OLD_PASSWORD('password');
off the top of my head.

BTW, no need to downgrade to PHP4.. it's a case of uncommenting a file in your php.ini and copying the libmysql.dll and php_mysql.dll files into your system32 folder.

Posted: Thu Jan 26, 2006 10:13 am
by mhouldridge
Yes,

That is what I do however I get the following error message;

Error 1133 (42000): Cant find any matching row in user table.


The above suggest that my user does not exist..... hmm.... however I can see it in there when connecting via mysql admin.


?

Posted: Thu Jan 26, 2006 10:43 am
by mhouldridge
Done it now...

Deleted the user then created it manually from the console.

Then checked the user table using;

SELECT USES, PASSWORD from mysql.users;