MySQL 5.7数据库可以用任意IP连接访问
1. 登录mysql
mysql -u root -p
2.查看mysql数据库:
use mysql;
3. 输入:
select user,host from user;
4. 更新如下即可(百分号不能发布):
update user set host='%' where user='root';
FLUSH PRIVILEGES;
5.查看:
select user,host from user;
6.重启数据库:
service mysqld restart
转载于:https://my.oschina.net/michaelshu/blog/1786788