has both a password and an authentication plugin specified. The password will be ignored

MySQL错误日志:has both a password and an authentication plugin specified. The password will be ignored,那是由于MySQL有个密码管理方式的plugin:mysql_native_password是自动生成的密码,而如果你单独为一些数据库设置了密码,就会出现上面的错误提示。

如何解决?

取消mysql_native_password密码管理方式,使用自己设置的密码。

具体解决方法:

mysql -u root p
SELECT user, host, plugin FROM mysql.user;
UPDATE mysql.user SET plugin = '' WHERE plugin = 'mysql_native_password';
FLUSH PRIVILEGES;
exit;
service mysqld restart

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注