1. 登录mysql:
mysql -u root -p2.查看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本文共 287 字,大约阅读时间需要 1 分钟。
1. 登录mysql:
mysql -u root -p2.查看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