mysql8.4版本mysql_native_password无法连接问题处理

avatar
作者
猴君
阅读量:0

mysql8.4版本mysql_native_password无法连接问题处理

用dbeaver可以直接连接

用NAVICAT连接后报错

  • 在网上查找8.0版本可以在my.ini里[mysqld]配置以下描述
    default_authentication_plugin=mysql_native_password
  • 仍然报错,翻文档发现In MySQL 8.4, the mysql_native_password server-side plugin is disabled by default.,也就是不允许这么配置了

解决方案

  • 但文档给出了另一种方案,在mysqld设置mysql_native_password=ON,实测可用
    改完my.ini后用管理员身份打开命令提示符重启mysl即可
net stop mysql net start mysql mysql -uroot -p -- 输入密码 alter user 'root'@'localhost' identified with mysql_native_password; alter user 'root'@'localhost' identified by '123456'; 
  • 如果不设置,则在修改账号验证方式时会报错ERROR 1524 (HY000): Plugin ‘mysql_native_password’ is not loaded

    广告一刻

    为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!