mysql安装启动过程中遇到的坑

MySQL8 踩坑

错误:1130 - Host ‘xxxx’ is not allowed to connect to this MySQL server

mysql8以下版本是可以通过

grant all privileges on *.* to [email protected]'host' identified by '密码' with grant option

来授权远程登录的,但是mysql8以后这个不好使了,需要
use mysql;
update user set host = '%' where user = 'root';

允许所有主机远程以root身份登录mysql数据库,想要单台登录的话把%改成单台主机

flush privileges;
然后就好用了
mysql安装启动过程中遇到的坑

navicat 连接mysql8.0.21数据库失败

Client does not support authentication protocol requested by server;

mysql安装启动过程中遇到的坑

解决方法

alter user ‘root’@’%’ identified with mysql_native_password by ‘123456’;

flush privileges;

mysql安装启动过程中遇到的坑