Forum Moderators: coopster

Message Too Old, No Replies

Can't Connect to mysql server

         

andrewsmd

9:07 pm on Nov 29, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm trying to connect to my mysql server and I am getting a weird error. This site has been working forever and just stopped. I know that the login credentials are correct because I have tested them via a command line and can connect fine. However, when I try to do it though php code I get this error.

Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in c:\somefolder\test.php on line 7
Error connecting to mysql

I researched it and tried to reset the password but that did not work. I'm hosting things on a win 2k8 server with IIS 7. Any help would be greatly appreciated.

lammert

3:15 am on Nov 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



MySQL uses two pieces of software. The server software part manages all the data, and the client software part is used by your application (the PHP script) to connect your application to that server part.

Between version 4.0 and 4.1, MySQL changed the way passwords are encrypted. It seems that the client part of MySQL is of version<4.1 and the MySQL server software of version>=4.1. You should upgrade the MySQL client in order to be able to connect the two pieces of software.

You may be able to change the password encryption method in your MySQL server to the pre-4.1 method, but this is in general not recommended because of security issues.

andrewsmd

8:31 pm on Nov 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



While that wasn't my exact problem, your answer did lead me to my solution. I had moved the site to a new server. When I added the php handler mapping I manually set it to the php4.dll on windows. Once I changed that to the php5.dll, it worked fine. Thanks for pointing me in the right direction.