Can't connect to MySQL server on '172.20.67.54'防火墙关闭了 权限也给了
怎么远程登录还提示这个啊
mysql> select Host User from user;
+--------------+
| User |
+--------------+
| % |
| 127.0.0.1 |
| 172.20.67.54 |
| ::1 |
| localhost |
| localhost |
+--------------+
6 rows in set (0.00 sec)
怎么远程登录还提示这个啊
mysql> select Host User from user;
+--------------+
| User |
+--------------+
| % |
| 127.0.0.1 |
| 172.20.67.54 |
| ::1 |
| localhost |
| localhost |
+--------------+
6 rows in set (0.00 sec)
才发现你中间少了个逗号.. 你看看host信息和user信息. 是不是和你连接信息一样.
实在不行
grant all privileges on 数据库 to %@%
[收集]mysql 无法联接故障现象及原因
这个错误信息就是服务器无法达到:172.20.67.54,你可以测试下,若是Linux服务器,执行:
telnet 172.20.67.54:3306或者直接ping 172.20.67.54
我要连接的是远程的数据库 IP是 172.20.67.140
我本机连接的时候提示
ERROR 1045 (28000): Access denied for user 'ROOT'@'172.20.67.54' (using password
: NO)我SSH上去的之后用root登陆没有问题
但是远程登陆不上,权限也赋值了有没有逗号都是一样的mysql> select Host User from user;
+--------------+
| User |
+--------------+
| % |
| 127.0.0.1 |
| 172.20.67.54 |
| ::1 |
| localhost |
| localhost |
+--------------+
6 rows in set (0.00 sec)172.20.67.54这个IP已经赋权限了 就是上不去
而却防火墙也都关了
还是不行
+--------------+------+
| Host | User |
+--------------+------+
| % | root |
| 127.0.0.1 | root |
| 172.20.67.54 | root |
| ::1 | root |
| localhost | |
| localhost | root |
+--------------+------+
6 rows in set (0.00 sec)
检查端口netstat -ant|grep 3306
检查防火墙iptables -L
如果都没有问题 直接使用root修改'ROOT'@'172.20.67.54'的密码吧
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
[root@localhost /]# iptables -L
WARNING: All config files need .conf: /etc/modprobe.d/vmware-tools, it will be ignored in a future release.
Chain INPUT (policy ACCEPT)
target prot opt source destination Chain FORWARD (policy ACCEPT)
target prot opt source destination Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@localhost /]# netstat -ant|grep 3306
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN