MySQL Server – Understanding Port 33060 in Addition to Port 3306

MySQLwindows-server-2019

background purpose: I want to restrict inbound connection to MYSQL server only for specific host by setting inbound rules of windows firewall.

MYSQL server port is open on 3306.

However, when I open firewall setting, I can see two ports are opened on 3306 and 33060 as follows:

enter image description here

what is that?

Best Answer

This connection port is used by the mysql clients to connect to the mysql server. However, in difference to port 3306. These connection uses the so called x-protocol. This port is supported by clients like Mysql-Shell or community Mysql-Connectors, while the mysqlclient and tools like mysqldump are using the classical Port. The x-protocol is a alternate mysql query interface that includes a alternate API called X-DevAPI. It allows you to access the data in json and also supports SQL. However, you have to allow it in your firewall settings unless you are deactivating this port/protocol on your mysql-server. So to sum it up for you: The x-protocol and the port 33060 is optional and not necessary.

Reference for general information about mysql Ports: https://dev.mysql.com/doc/mysql-port-reference/en/mysql-ports-reference-tables.html

Reference on X-Protocol: https://www.percona.com/blog/2019/01/07/understanding-mysql-x-all-flavors/