# Port 3306 (MySQL)

> Port 3306 is the default port for MySQL and MariaDB. Its IANA registration, transports and port range.

Source: https://networkutility.org/ports/port-3306/  
Section: Ports  
Updated: 2026-12-05

Port 3306 is registered with IANA under the service name `mysql`, on TCP and UDP. It is one of the registered (user) ports, 1024 to 49151.

## IANA registration

This is the assignment for port 3306 exactly as the registry lists it, one row per service name and transport.

| Service name | Transport | Description | Reference |
| --- | --- | --- | --- |
| `mysql` | TCP | MySQL | None listed |
| `mysql` | UDP | MySQL | None listed |

Source: [IANA Service Name and Transport Protocol Port Number Registry](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml), as downloaded on December 5, 2026. The registry changes over time; the linked page is the authority.

A registration records who a port number is assigned to. It does not prove that whatever is listening on the port is that service, and it does not mean the service uses every transport listed: older entries were routinely registered for both TCP and UDP.

## In practice

*This section is written by Network Utility. It is not part of the IANA registry.*

Port 3306 is the default port for MySQL and MariaDB.

MySQL and MariaDB servers listen on TCP port 3306 by default. The registry also lists UDP, but the database protocol runs over TCP.

A database should not be reachable from the internet. Bind the server to localhost or a private address, allow port 3306 only from the application servers, and reach it through an SSH tunnel or VPN for administration. Exposed servers are scanned continuously for weak passwords.

Related ports: [5432 (PostgreSQL)](/ports/port-5432/), [1433 (Microsoft SQL Server)](/ports/port-1433/), [1521 (Oracle Database listener)](/ports/port-1521/).

## Port range

Port 3306 falls in the **registered (user) port** range, 1024 to 49151. RFC 6335 calls these User Ports. IANA assigns them on request through IETF Review, IESG Approval or Expert Review. Any program can listen on them without special privileges, so it is common to find software using a port in this range that is registered to something else.

The other ranges are well-known (system) ports (0 to 1023) and dynamic (private) ports (49152 to 65535). The ranges and the assignment rules are defined in [RFC 6335](https://www.rfc-editor.org/rfc/rfc6335).

Look up another port in the [port table](/port-lookup/).
