升级到Mysql8 后的连接问题和允许远程访问

1.Navicat连MySql8报错的问题

用mysql命令行登陆mysql,执行以下命令,修改加密方式

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
mysql> FLUSH PRIVILEGES;

2.允许远程连接Mysql8

mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'root';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
mysql> flush privileges;

 

posted @ 2020-01-03 12:48  小y  阅读(...)  评论(...编辑  收藏