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 0.0.0.0:3306 0.0.0.0:* LISTEN 25934/mysqld |
Alternatively, you can login to MySQL, and run the following:
mysql> SHOW GLOBAL VARIABLES LIKE 'PORT'; |