MySQL: Find out which port MySQL Runs on

person Jason Huangfolder_openLINUX, MySQLlocal_offer, , , access_time February 25, 2017

In Linux, you can try use this command:

netstat -tlnp

Normally it’s set to run on port 3306. This command shows you something like:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0  *               LISTEN      25934/mysqld

Alternatively, you can login to MySQL, and run the following:


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>