I'm trying to get a site running locally that is currently running on a dev server running PHP 5.3.10. It connects to a MySQL server that is version 5.5, but has old_passwords
set to ON
.
The site works on the dev server.
On my local, I am running PHP 5.3.26 and when trying to connect I get:
Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file
I understand that this is an issue with the old_password variable, but it is running on the dev server with PHP 5.3.
Edit:
Here's my local mysql section from phpinfo()
:
The dev server's mysql section:
How do I set up my local to match the dev server?
The PHP version is not the problem here, as of PHP 5.3 "old" MySQL passwords are not supported anymore. Probably two different permission profiles are applied. Are you connecting to the same server? Then something like this could be happening:
User Host
youruser % (using old-style password)
youruser localhost (using new-style password)
That you are using the same credentials does not necessarily mean that those are referring to the same account or permission profile.