Port 3306 — MySQL / MariaDB

Quick reference for TCP/UDP port 3306, used by MySQL / MariaDB. Includes what the service does, security guidance and related ports.

Port
3306
Protocol
TCP
Service
MySQL / MariaDB

What is port 3306?

MySQL and MariaDB database.

What port does MySQL / MariaDB use?

MySQL / MariaDB listens on port 3306 by default.

Is port 3306 open? How to check

Run one of these from your computer, replacing HOST with the IP address or domain you want to test.

Linux / macOS
nc -zv HOST 3306
Windows (PowerShell)
Test-NetConnection HOST -Port 3306
nmap
nmap -p 3306 HOST

A refused or timed-out connection means the port is closed or filtered by a firewall.

Security guidance

High risk — do not expose to the internet

Port 3306 (MySQL / MariaDB) is high-risk because the service it carries is a frequent target for credential attacks, brute force or unpatched-vulnerability scanning. Keep it bound to localhost or your VPN, never forward it directly on a router, and require strong authentication.

Related ports

Frequently asked

What is port 3306 used for?+

Port 3306 is the standard TCP/UDP port for MySQL / MariaDB. MySQL and MariaDB database.

What port does MySQL / MariaDB use?+

MySQL / MariaDB listens on port 3306 by default.

PROTECT YOUR PRIVACY

Your IP Address Is Exposed Right Now

Every website you visit can see your real IP address and location. NordVPN encrypts your traffic and hides your identity with military-grade encryption. Stay anonymous online.

Get NordVPN — 73% Off30-day money-back guarantee
SECURITY TIP

Using default passwords? Protect your network with NordVPN encryption.