Identify the MySQL listening port
1.
Login to your MySQL database server.
2.
Locate your my.cnf file.
3.
Look for the port definition.
For example:
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock