解决“在连接linux远程服务器上的mysql数据库时,报“Access denied for user 'root'@'ip地址'”问题”

在连接linux远程服务器上的mysql数据库时,报“Access denied for user 'root'@'ip地址'”问题:

1.mysql -u -root -p  输入密码

2.mysql>grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;

3.mysql>flush privileges;

4.exit;   退出mysql

5.service mysqld restart  重启mysqld

猜你喜欢

转载自blog.csdn.net/panchang199266/article/details/79637749
今日推荐