mysql允许远程连接

# 修改密码

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

你可能感兴趣的:(mysql允许远程连接)