In this post we will discuss about MySQL Port numbers which is used by MySQL Server on Linux and windows. As you know that MySQL default port is 3306 but apart from this, it uses several other ports as well for different purpose.
List of MySQL Port Number
MySQL Default Port :
3306/TCP is the MySQL default port which uses TCP protocol for MySQL client-server communication.
33060/TCP : Used for MySQL client to server connection for X Protocol. It is required unless you are only using port 3306.
Query to Check Which Port MySQL is running on:
mysql> SHOW VARIABLES LIKE 'port'; mysql> SHOW GLOBAL VARIABLES LIKE 'port'; $ cat /etc/mysql/my.cnf | grep -i port
MySQL Administrative connection Port:
33062/TCP – This port is configured mainly for administrative connections. This port is not required but it provides alternative to the single administrative connection that is permitted on the network interface for ordinary connections. You can verify admin port value using below command.
mysql> SHOW VARIABLES LIKE 'admin_port';
MySQL High Availability Ports:
33061/TCP – This is the default MySQL group replication and internal communication port which is required for group replication communication between group members like InnoDb, cluster instances. It is also used by MySQL shell to check a server during InnoDB cluster configuration.
3306/TCP – This is the default port used for MySQL replication.
MySQL Backup Ports:
3306/TCP – This port is used for InnoDB cluster backup.
443/TCP – This port is used for Amazon s3 and Oracle object store purpose.
MySQL External Authentication Port:
389/TCP – It is used for MySQL Enterprise Authentication to LDAP and Active Directory.
Conclusion: MySQL uses 3306 as a default port for client server communication. It uses other ports as well for different tasks. You can configure MySQL ports other than 3306 as default port in my.cnf file and restart the server to change the configuration.