MySQL:mysqlnd无法使用旧的不安全身份验证连接到MySQL 4.1+

时间:2020-02-23 14:45:05  来源:igfitidea点击:

尝试连接到MySQL 4.x和更高版本的服务器时,发生以下错误:

DB connection error: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user.

这是因为MySQL服务器正在接受MySQL 3.x的旧式身份验证。
您需要通过注释禁用此功能或者删除" my.cnf"中的以下参数:

old_passwords=1