1 Use natstat command
Check the port number
Meaning 2 -antp parameters
2.1 p is a program
netstat -p can be used with other switches, you can add "PID / process name."
2.2 a is all
netstat -a that displays all socket.
2.3 n is a numeric
Direct use of IP addresses, rather than by the domain name server.
2.4 t is tcp
Show only socket tcp protocol.
3 View mysqld listening port number
natstat -antp | grep mysql | grep LISTEN
Magical pipe.
Port View 4 uses mysql
show global variables like 'port';