After a mysql upgrade, mysql on the development machine is upgraded to mysql 5.6. As a result, the following exception is reported when the mysql server of some earlier versions is connected:
Warning: mysql_connect (): Connection using old (pre-4.1.1) authentication protocol refused (client option 'Secure _ auth' enabled)
The cause of the exception is that the password management protocol on the server is outdated, and the old User Password format is used for storage. However, after the client is upgraded, the new password format is used. If this inconsistency occurs in MySQL, the connection is denied.
See the description of the -- secure-auth option in the "Server Command Options" section of the mysql Manual: http://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_secure-auth
There are three solutions:
1. Enable secure_auth for server upgrade;
2. Disable secure_auth when connecting the client, that is, add -- secure_auth = off when connecting, for example, mysql-p10.51.1.11-P3308-uroot -- secure_auth = off.
3. Find the corresponding mysql user and change the PASSWORD to the new encryption method, password ('your password'), such:
Copy codeThe Code is as follows: set password for root = PASSWORD ('20140901 ');
For method 2, use the corresponding mysql configuration in the program. For example, set secure_auth = off in php. ini.