LEGAL DISCLAIMER: This platform is for authorized security research and educational purposes only. Scanning assets without permission is illegal.
Port Intelligence Profile

Port 3306: MySQL

Analyze default service protocols, historical security vulnerabilities, hardening methods, and firewall rules for port 3306.

Default Service
MySQL
Protocol
TCP
Risk Level
High
Port Range
System (1-1023)

1. Port Purpose & Usage

MySQL is a popular open-source relational database management system. Port 3306 is the default port used by clients and applications to connect to the database server.

Common Service Implementations

MySQL Server

The default Oracle-backed open source relational database server.

MariaDB

An enterprise-grade, open-source fork of MySQL.

2. Security Risks & Vulnerability Profiles

Exposing MySQL publicly on port 3306 is a major security risk. It invites automated brute-force attacks against database passwords. Any SQL injection or authentication bypass vulnerability can lead to direct database compromise or server control.

Historical CVE References

CVE-2012-2122

MySQL Password Authentication Bypass. A critical flaw in the authentication protocol allowed remote attackers to sign in to MySQL servers without knowing the password simply by repeating connection attempts.

CVE-2021-27928

MariaDB Privilege Escalation. An arbitrary library loading vulnerability allowed authenticated attackers to run code on the system with root privileges.

3. Hardening & Mitigation Checklist

1
Bind MySQL to localhost (bind-address = 127.0.0.1) so it does not listen on the public network interface.
2
Require SSL/TLS encryption for all remote database connections.
3
Enforce strict password complexity rules and rename or remove default admin account names.

4. Firewall Command Examples

Use the following system configurations to restrict open port exposure on Linux hosts:

# UFW: Deny database access to the public internet ufw deny 3306/tcp
# iptables: Allow MySQL only from a specific secure application server IP iptables -A INPUT -p tcp -s 192.168.1.100 --dport 3306 -j ACCEPT iptables -A INPUT -p tcp --dport 3306 -j DROP

Further Analysis

Database & Cache Ports

Ports often operate in clusters. When analyzing a service on Port 3306, security engineers typically check the status of these related ports.