centos6.5上安装5.7版本的mysql

centos6.5上安装5.7版本的mysql

 https://www.cnblogs.com/lzj0218/p/5724446.html

设置root可以在本机以外的机器访问

 mysql -uroot -ppassword

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

搜权 myuser 用户可以用mypassword,从指定ip访问 所有的库中所有表

grant all privileges on *.* to 'myuser'@'192.168.0.1' identified by 'mypassword' with grant option

猜你喜欢

转载自www.cnblogs.com/moris5013/p/10823147.html