navicat无法访问mysql8解决方案,修改root密码
1.开放3306端口
firewall-cmd --zone=public --permanent --add-port=3306/tcp
firewall-cmd --reload
2.修改root密码
mysql -uroot -p
alter user 'root'@'localhost' identified with mysql_native_password by '123456';
或者
alter user 'root'@'%' identified with mysql_native_password by 'Clypg!@#2023';
3.设置mysql可以任意主机访问
use mysql
select host, user from user;
update user set host='%' where user='root';
flush privileges;
参考:
https://blog.csdn.net/zhbit000001/article/details/120664524