1,查看mysql.user表的
select * from user where host = "%" \G;
-- host %允许任何客户端连接
-- user root
password 需要修改加密密码pass
2,修改密码
UPDATE user
SET Password
=PASSWORD('密码') where user ='root' and host="%" ;
3,刷新权限
FLUSH PRIVILEGES;
4,连接成功,否则重启mysql
1,查看mysql.user表的
select * from user where host = "%" \G;
-- host %允许任何客户端连接
-- user root
password 需要修改加密密码pass
2,修改密码
UPDATE user
SET Password
=PASSWORD('密码') where user ='root' and host="%" ;
3,刷新权限
FLUSH PRIVILEGES;
4,连接成功,否则重启mysql