【mysql5.7】远程无法连接设置

版本5.7

系统:ubuntu16.04

配置文件位置(apt安装):

1、链接设置

注释掉在/etc/mysql/mysql.conf.d/mysqld.cnf里面的bind-address = 127.0.0.1

/etc/init.d/mysql restart

2、权限设置

登录:mysql -u root -p

切换库:mysql> use mysql;

查看权限:mysql> select host from user where user='root';

授权:mysql> update user set host = '%' where user ='root';

猜你喜欢

转载自blog.csdn.net/the_fool_/article/details/80571755