PHP cannot connect to the mysql database. my development environment is xampp under lixnu. it was installed only a few days ago and the versions are newer. Both the command line and phpmyadmin can be used to connect to the mysql database. everything works normally. However, when using the mysql_connect () function to connect to the mysql database, the following error occurs: clientdoesnotsuppauthauthenticationprotocolrequested. for help, PHP cannot connect to the mysql database.
My development environment is xampp under lixnu, which was installed the last few days. the versions are newer.
Both the command line and phpmyadmin can be used to connect to the mysql database. everything works normally.
However, an error is reported when the mysql_connect () function is used for connection:
Client does not support authentication protocol requested by server; consider upgrading MySQL client
I checked it online and said the password is incompatible. I tried it with the OLD_PASSWORD.
So depressed! Which of the following friends helped me?
------ Solution --------------------
Client does not support authentication protocol requested by server; consider upgrading MySQL client
The client does not support the authentication protocol required by the server; consider upgrading the MySQL client
The version you are using is very old. please provide it. Take a look
------ Solution --------------------
Then try to update the client.