Problem and solution of: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client

Background: Just upgrade from MySQL 4.0 to Mysql 5.0. First stop the MySQL 4 services > run the MySQL 5 installer > Rename the services name from 'Mysql' to 'Mysql5' if you have the problem that the mysql services name is conflicted. After that, using PHP 4.3.3 > use mysql_connect to connect to this server > the above problem exist.

Problem: Error: "mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client"

Solution:This is the problem of old_password in Mysql 4. In short, after upgrading to mysql 5, the encryption method of user's password is different from mysql 4. If you CREATE A USER IN MYSQL 5, since the password encryptio method will be different from mysql 4, even if the username and password are exactly the same, you cannot connect to this brand new mysql 5 server.

To solve: I use Mysql administrator provided and freely download from www.mysql.com. Login to database FROM LOCAL COMPUTER (Remote login using mysql administrator cannot do some of the settings.) > Go to 'Startup variables' > 'Security' tab > check the 'Use old passwords' options.

After that, YOU HAVE TO RESET YOUR USER'S PASSWORD AGAIN. For example, if I have a user called 'userA' and password 'passA' before check the 'Use old passwords', after check that box, you have to change again the user password (Use the same password is ok). Once you applied changes to that user. You can connect again the database.

Hope it helps.

Comments

Popular posts from this blog

TCPDF How to show/display Chinese Character?

Wordpress Load balancing: 2 web servers 1 MySQL without any Cloud services

Using wget bypass htaccess username password 401 authorization