Port 3306: MySQL

Port 3306 is the default for MySQL and MariaDB. Keep it bound to localhost or an internal network; exposing it invites brute-force and injection attempts.

TCPDatabasesUnencrypted by defaultIANA assigned
Port number3306
ServiceMySQL / MariaDB
ProtocolTCP
CategoryDatabases
Default encryptionNo
Security note. Port 3306 is not encrypted by default. Restrict it to trusted networks, or use an encrypted alternative where one exists, to avoid exposing credentials and data in transit.

Frequently asked questions

What is port 3306 used for?

Port 3306 is the default for MySQL and MariaDB. Keep it bound to localhost or an internal network; exposing it invites brute-force and injection attempts.

Is port 3306 TCP or UDP?

Port 3306 (MySQL) uses TCP.

Is port 3306 secure?

Port 3306 is not encrypted by default. Where possible, use an encrypted alternative or tunnel it over TLS or a VPN.

Should I open port 3306 on my firewall?

Only if you specifically need MySQL. Expose it to the smallest set of trusted sources, and never open database or Windows-service ports to the whole internet.