Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Client does not support authentication protocol requested by server

I need to establish PHP4 environment in conjunction with mysql5 and I am facing this problem when I try to connect to mysql.

Thank you for any trace.

like image 853
palmic Avatar asked Dec 29 '22 04:12

palmic


1 Answers

The solution is to update the database user’s password using the OLD_PASSWORD function of MySQL. For example:

[chris@office ~]$ mysql -u root -p mysql

Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 267
Server version: 5.1.41-3ubuntu12.1 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql;
Database changed

mysql> update user set Password=OLD_PASSWORD('password') WHERE User='username';

Query OK, 0 rows affected (0.02 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

mysql>
like image 139
palmic Avatar answered Dec 30 '22 18:12

palmic