看来我的服务器上用于远程 MySQL 访问的端口 3306 已关闭。在 /etc/mysql/my.cnf 中,我已将 bind-address 设置更改为我的远程 IP,并重新启动了服务器。不过,对本地主机和我的远程 IP 进行 nmap 扫描显示,它仍然处于关闭状态,并且只能从本地主机访问:
root@an0n:/etc/mysql/conf.d# nmap REMOTEIP
Starting Nmap 5.00 ( http://nmap.org ) at 2015-04-09 20:30 MSK
Interesting ports on DOMAIN (REMOTEIP):
Not shown: 995 closed ports
PORT STATE SERVICE
22/tcp open ssh
53/tcp open domain
80/tcp open http
139/tcp open netbios-ssn
445/tcp open microsoft-ds
Nmap done: 1 IP address (1 host up) scanned in 0.17 seconds
root@an0n:/etc/mysql/conf.d# nmap localhost
Starting Nmap 5.00 ( http://nmap.org ) at 2015-04-09 20:30 MSK
Warning: Hostname localhost resolves to 2 IPs. Using 127.0.0.1.
Interesting ports on localhost.localdomain (127.0.0.1):
Not shown: 992 closed ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
53/tcp open domain
80/tcp open http
139/tcp open netbios-ssn
445/tcp open microsoft-ds
587/tcp open submission
3306/tcp open mysql
Nmap done: 1 IP address (1 host up) scanned in 0.12 seconds
我现在该在哪里搜索?顺便说一句,我从未使用过 iptables。