ubuntu开启mysql外部访问
1. 改表法
mysql -uroot -proot
mysql>use mysql;
mysql>udpate user set host='%' where user='root';
mysql>select host,user from user wher user='root';
mysql>flush privileges;
ubuntu还要改一下mysql.conf.d
#bind-address = 127.0.0.1
service mysql restart
如果连不上就用授权法
2. 授权法
mysql -uroot -proot
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION;
FLUSH PRIVILEGES;
ubuntu开启mysql外部访问
http://blog.icy8.cn/posts/21614/