# 修改密码
mysqladmin -u root password "123456"
mysql -u root -p
# 改表实现远程连接
use mysql;
update user set host = '192.168.6.66' where user = 'root';
select host,user,password from user;
# 授权实现远程连接
use mysql;
grant all privileges on *.* to root@'%' identified by "password";
# 参考
https://www.jb51.net/article/159865.htm
网友评论