MYSQL登录授权 - 允许用户远程连接

进入控制台

# mysql -uroot -proot

修改表

mysql>use mysql;
mysql>update user set host = '127.0.0.1' where user = 'root';
mysql>select host, user from user;

也可以用 host = '%' 设置为从任何主机都能连接

重载授权表:

mysql>FLUSH PRIVILEGES;

退出

#  mysql>exit;

猜你喜欢

转载自blog.csdn.net/weikaixxxxxx/article/details/85038165