mysql8 更新安装异常

刚装了mysql8.0,用navicat登陆不了,会出现2059错误,只能用命令行登陆

1.找到配置文件my.ini

将default_authentication_plugin=caching_sha2_password改为default_authentication_plugin=mysql_native_password

2.用命令行登陆

mysql -u root -p 

3.use mysql

4.ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';

5.flush privileges;

6.可以用navicat登陆了

二升级到mysql8以后

mysql8.0 ERROR 1146 (42S02): Table 'mysql.role_edges' doesn't exist

或者ERROR 1449(HY000): The user specified as a definer('mysql.infoschema'@'localhost')does not exist

在服务器端执行

mysql_upgrade -u root -p

你可能感兴趣的:(mysql8 更新安装异常)