因为高温,已经两个月左右的时间没敢打开笔记本了。前天开机登录linux,用navicat连接mysql,报错了。一着急,就把ubantu恢复到初装数据库的快照了。然后,从头开始,设置mysql的允许远程连接。
use mysql;
select host, user, authentication_string, plugin from user;
update user set host='%' where user='root';
select host, user, authentication_string, plugin from user;
flush privileges;
quit;
sudo service mysql restart;
打开navicat,建立连接,搞定。