Port 3306 – MySQL

Service:

mysqld

Protocol:

TCP

Port:

3306

Used for:

SQL database access

Why It’s Open

Standard port for MySQL — common in LAMP/LEMP stacks and backend infrastructure.

Common Risks

  • Default Credentials or Weak Passwords
  • Remote Root Access Enabled
  • SQL Injection from Web Apps

Want to save time on reporting?

Let PentestPad generate, track, and export your reports - automatically.

logo-cta

Enumeration & Testing

Nmap info

Terminal window
nmap -p 3306 -sV
nmap -p 3306 --script mysql-info

MySQL

Terminal window
mysql -h -u root -p
sql
SHOW DATABASES;
SELECT user, host FROM mysql.user;

What to Look For

CheckpointWhat it means
Remote root loginShould be disabled
No password or weakCommon in dev/test setups
Old versionMay contain known exploits

Known Exploits

  1. CVE-2015-2620 Unspecified vulnerability in Oracle MySQL Server 5.5.43 and earlier and 5.6.23 and earlier allows remote authenticated users to affect confidentiality via unknown vectors related to Server : Security : Privileges.
    🔗 NVD entry

Mitigation

  • Require strong passwords.
  • Disable root remote login.
  • Restrict access via host/IP.
  • Patch regularly.

TL;DR

  • Service: MySQL (Relational Database)
  • Default Port: 3306
  • Risks: Weak authentication, privilege escalation
  • Mitigation: Use strong passwords, restrict access, keep software updated