PHP cannot connect to mysql database

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.