linux远程连接mysql

1、先 ping 一下数据库服务器的ip 地址确认网络畅通。
 
2、关闭数据库服务的防火墙
    service iptables stop
 
3、

 先执行如下命令给root用户所有权限以及远程连接的权限,并设置密码为111111:
    grant all privileges on *.*  to root@'%'  identified by '111111';

确认Mysql中已经有可以通过远程登录的账户
    select  * from mysql.user where user='root' and host='%';
 
4、测试连接:

猜你喜欢

转载自blog.csdn.net/QJQJLOVE/article/details/105820967
今日推荐