How to know which port MySQL is running on – Ubuntu

To find a listener on a port, do this:

You should see a line that looks like this if mysql is indeed listening on that port.

 reference: stackoverflow.com