【发布时间】:2019-12-03 17:55:09
【问题描述】:
我无法使用 mysql 让其他 PC 连接到我的服务器。 我已经设置了 bind-address = 0.0.0.0
网络统计:
root@localhost:~# netstat -nlt | grep 3306
tcp6 0 0 :::3306 :::* LISTEN
远程登录:
root@localhost:~# telnet liortesta.cf 3306
Trying 104.254.244.201...
Connected to liortesta.cf.
Escape character is '^]'.
[
5.7.26-0ubuntu0.18.04.1
K)%O)Vs Z
^;
3mysql_native_password
nmap:
root@localhost:~# nmap -p 3306 liortesta.cf
Starting Nmap 7.60 ( https://nmap.org ) at 2019-07-25 12:39 UTC
Nmap scan report for liortesta.cf (104.254.244.201)
Host is up (0.000037s latency).
rDNS record for 104.254.244.201: linux
PORT STATE SERVICE
3306/tcp open mysql
Nmap done: 1 IP address (1 host up) scanned in 0.29 seconds
来自另一台服务器:
nmap -p 3306 liortesta.cf
Starting Nmap 7.01 ( https://nmap.org ) at 2019-07-25 08:56 EDT
Nmap scan report for liortesta.cf (104.254.244.201)
Host is up (0.051s latency).
PORT STATE SERVICE
3306/tcp filtered mysql
Nmap done: 1 IP address (1 host up) scanned in 0.92 seconds
root@serv:~# telnet liortesta.cf 3306
Trying 104.254.244.201...
2003,“无法连接到 'liortesta.cf' 上的 MySQL 服务器(超时)
我不知道该怎么办
【问题讨论】:
-
这些远程PC是如何连接的?他们使用的是什么 MySQL 用户帐户
-
我正在尝试连接 pymysql。到另一台我的服务器连接正常,而从另一台服务器我也无法连接到问题服务器的 mysql(通过 pymysql)
-
您是否将用户帐户设置为允许从远程位置连接?
-
是的,它允许从 % 连接 - 任何地址,但即使不是,我也会被拒绝访问,但现在我超时了
标签: mysql server connection