Mysql 设置其他机器可访问

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/luolan_hust/article/details/89710954

Mysql 设置其他机器可访问

1. 进入mysql
2. mysql> use mysql;
3. mysql> update user set host='%' where user = 'root';
4. mysql> grant all privileges on *.* to 'root'@'%' with grant option;
		grant all on *.* to 'root'@'%' identified by '123456' with grant option;
5. mysql> flush privileges;
6. mysql>exit;
   其他机器可以连接了
   mysql -h ip -uroot -p密码

猜你喜欢

转载自blog.csdn.net/luolan_hust/article/details/89710954
今日推荐