Port 3306
mysql · TCP/UDP
| Range | Registered port (1024–49151) |
|---|---|
| Protocol | TCP/UDP |
| Service | mysql |
Frequently asked questions
What is port 3306 used for?
Port 3306 is registered with the IANA for mysql (TCP/UDP). Description: MySQL.
Is port 3306 a well-known port?
No. Port 3306 is in the range 1024–49151 (registered or user ports). Ordinary programs may open it without root privileges.
How do I check whether port 3306 is open?
Locally on Linux with ss -tulpn | grep ':3306\b', on Windows with netstat -ano | findstr :3306. To test a remote host use Test-NetConnection <host> -Port 3306 in PowerShell or nc -zv <host> 3306 on Linux/macOS.
How do I open port 3306 in the firewall?
Ubuntu/Debian (ufw): sudo ufw allow 3306/tcp. Fedora/RHEL (firewalld): sudo firewall-cmd --add-port=3306/tcp --permanent, then firewall-cmd --reload. Windows (PowerShell as administrator): New-NetFirewallRule -DisplayName "Port 3306" -Direction Inbound -Protocol TCP -LocalPort 3306 -Action Allow.
IANA registry entries
| Protocol | Service | Description (IANA) |
|---|---|---|
| TCP | mysql | MySQL |
| UDP | mysql | MySQL |