MySQL 5.7连接超时

时间:2018-09-17 18:36:00

标签: mysql

我无法从外部服务器连接到MySQL。

nc -v -w 10 128.199.243.122 3306
128.199.243.122 3306 (mysql): Operation timed out

我的配置文件/etc/mysql/mysql.conf.d/mysqld.cnf

[mysqld]
...
bind-address            = 0.0.0.0

当我在本地计算机上进行测试

nc -v 127.0.0.1 3306
Connection to 127.0.0.1 3306 port [tcp/mysql] succeeded!

ufw状态

$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
Nginx HTTP                 ALLOW       Anywhere
22/tcp                     ALLOW       Anywhere
3306/tcp                   ALLOW       Anywhere
Nginx HTTP (v6)            ALLOW       Anywhere (v6)
22/tcp (v6)                ALLOW       Anywhere (v6)
3306/tcp (v6)              ALLOW       Anywhere (v6)

我已经重新启动了所有服务(ufw,mysql,nginx)

0 个答案:

没有答案