客户端不支持服务器请求的身份验证协议

pal*_*mic 4 php mysql authentication php4 protocols

我需要与mysql5一起建立PHP4环境,当我尝试连接到mysql时我遇到了这个问题.

谢谢你的任何痕迹.

pal*_*mic 7

解决方案是使用MySQL的OLD_PASSWORD函数来更新数据库用户的密码.例如:

[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>
Run Code Online (Sandbox Code Playgroud)