- SOLVED - Same old Authentication problem - SOLVED -

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

- SOLVED - Same old Authentication problem - SOLVED -

Post 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!
Last edited by mhouldridge on Thu Jan 26, 2006 10:43 am, edited 1 time in total.
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Post 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!
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

you using PHP5?
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Post by mhouldridge »

Yep.

I dont think it is connecting to my database correctly.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post 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
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Post 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.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post 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.
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Post 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.


?
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Post 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;
Post Reply