Search code examples
mysqlserverconnection

how to fix mysql 2003 timed out error on ubuntu server?


I can't make other PC connect to my server with mysql. I already set bind-address = 0.0.0.0

netstat:

root@localhost:~# netstat -nlt | grep 3306
tcp6       0      0 :::3306                 :::*                    LISTEN

telnet:

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

from another server:

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, "Can't connect to MySQL server on 'liortesta.cf' (timed out)

I don't know what to do


Solution

  • Sorry, server provider also has firewall and it blocked my connections