[MySQL] Client does not support authentication protocol的解决

来源:互联网 发布:双肩包 男 知乎 编辑:程序博客网 时间:2024/04/30 12:54

Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function:

mysql> SET PASSWORD FOR    -> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

Alternatively, use UPDATE and FLUSH PRIVILEGES:

mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')    -> WHERE Host = 'some_host' AND User = 'some_user';mysql> FLUSH PRIVILEGES;
由于MYSQL的新版密码算法与老版有所改变,所以需要用此方法更新表内用户的密码
原创粉丝点击