Linux设置mysql远程访问

来源:互联网 发布:淘宝助理 批量编辑 编辑:程序博客网 时间:2024/05/17 22:44

非root用户获取root权限

su - root

登录mysql

root#mysql -h localhost -uroot -p
mysql> use mysql;
mysql> select host,user from user;
mysql> Grant all privileges on *.* to 'root'@'%' identified by 'pwd' with grant option;
mysql> flush privileges; 

0 0