Linux下允许mysql远程访问

1.检测配置文件(/etc/mysql/mysql.conf.d/mysqld.cnf) 注释掉bind-address  = 127.0.0.1;作用是不再只允许本地访问;

2.重启mysql:/etc/init.d/mysql restart; 

3.GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;

4.flush privileges;

posted @ 2017-10-23 16:37  Againn  阅读(399)  评论(0编辑  收藏  举报