I am try to set up mysql remotely. I have followed a number of guides such as this, and I have ended up using nmap to see what ports are open.
When I am on my laptop, nmap -P0 <server>
gives:
Nmap scan report for <> (ip.address.here)
Host is up (0.054s latency).
Not shown: 997 filtered ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
443/tcp open https
So it doesn't show port 3306 being open.
However on my server (Ubuntu 14.04), if I run nmap -P0 localhost
I get the following:
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00064s latency).
Not shown: 995 closed ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
443/tcp open https
3306/tcp open mysql
Which implies that the port is open as it should be. What could be causing the discrepancy? (Admittedly this is my first time using nmap). Is this the reason I can't connect to my mysql server?
Additionally, from my laptop (windows using linux subsystem) telnet <host> 3306
gives an error saying that the remote resource is not available.