Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the port 33060 for mysql server ports in addition to the port 3306

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? Should I restrict 33060 as well?

like image 560
Herbert Avatar asked Aug 24 '20 07:08

Herbert


People also ask

What Mysqlx 33060?

The port for X Protocol (mysqlx_port), supported by clients such as MySQL Shell, MySQL Connectors and MySQL Router, is calculated by multiplying the port used for classic MySQL protocol by 10. For example if the classic MySQL protocol port is the default value of 3306 then the X Protocol port is 33060.

Can MySQL use port 3307?

MySQL (or most/all other processes) can listen on just about any port (0-65535) though ports below 1024 are privileged and require special permissions (usually root/admin). There is no difference in port 3306, 3307 or 8279 for that matter other than that 3306 is the default port for MySQL.

How do I know if MySQL is reachable on port 3306?

The correct way is using: sudo lsof -i :3306 .


1 Answers

The port for X Protocol (mysqlx_port), supported by clients such as MySQL Shell, MySQL Connectors and MySQL Router, is calculated by multiplying the port used for classic MySQL protocol by 10. For example if the classic MySQL protocol port is the default value of 3306 then the X Protocol port is 33060.

See MySQL Port Reference Tables for more information.

The MySQL X service, is listening on all interfaces, on TCP port 33060 and clients can connect to it through x protocol. So you need to restrict it for specific host to ban it to connect through x protocol.

like image 168
Majid Hajibaba Avatar answered Sep 20 '22 18:09

Majid Hajibaba