Port 3306: MySQL / MariaDB
MySQL and MariaDB database connections. Exposed databases are found within hours and brute-forced or wiped for ransom. Bind to 127.0.0.1 or a private network.
- Free
- No Sign-Up
- Runs in Your Browser
Port Lookup
Port 3306 at a glance
Port3306
ProtocolTCP
ServiceMySQL / MariaDB
Open to the Internet?No, keep it on a private network
See What Is Listeningss -lntup | grep ':3306 '
Test From Outsidenc -zv your-server 3306
Block with UFWufw deny 3306/tcp
Block with nftablesnft add rule inet filter input tcp dport 3306 drop
MySQL / MariaDB uses TCP port 3306. MySQL and MariaDB database connections.
Exposed databases are found within hours and brute-forced or wiped for ransom. Bind to 127.0.0.1 or a private network.
If ss shows something listening on port 3306 on a public address, bind it to 127.0.0.1 or a private interface in the service's own configuration, and drop the port in the firewall as well.
Other Ports
20 FTP Data21 FTP22 SSH23 Telnet25 SMTP53 DNS67 DHCP Server80 HTTP110 POP3123 NTP143 IMAP161 SNMP389 LDAP443 HTTPS445 SMB465 SMTPS514 Syslog587 Mail Submission853 DNS over TLS993 IMAPS995 POP3S1194 OpenVPN1433 Microsoft SQL Server1900 SSDP / UPnP2049 NFS2083 cPanel (SSL)2087 WHM (SSL)3306 MySQL / MariaDB3389 RDP3478 STUN / TURN5060 SIP5432 PostgreSQL5900 VNC6379 Redis8006 Proxmox VE8080 HTTP Alternate8443 HTTPS Alternate11211 Memcached25565 Minecraft27017 MongoDB51820 WireGuard
Questions
What is port 3306 used for?
MySQL / MariaDB. MySQL and MariaDB database connections.
Is it safe to open port 3306?
No, keep it on a private network. Exposed databases are found within hours and brute-forced or wiped for ransom. Bind to 127.0.0.1 or a private network.
How do I check if port 3306 is open?
On the server, ss -lntup | grep ':3306 ' shows what is listening. From another machine, nc -zv your-server 3306 shows whether the firewall lets it through.
How do I block port 3306?
With UFW: ufw deny 3306/tcp. With nftables, add a drop rule for dport 3306 in your input chain.
Free Tools
More tools
Port LookupWhat runs on a TCP or UDP port, and whether it should be open.Firewall Rule GeneratorGenerate iptables, nftables and UFW rules for common server set-ups.What Is My IPYour public IP address, reverse DNS, network and ASN.IP Reputation CheckerCheck an IP against spam blocklists and threat feeds at once.
Abuse from open ports on your VMs?
Frabs spots amplification, scans and floods leaving any VM and stops them, without touching your firewall.