Toolman

Port 3306 — MySQL / MariaDB

TCP registered

What runs on port 3306

The default MySQL and MariaDB port.

Security considerations

Bind to 127.0.0.1 unless a remote application genuinely needs it, and then restrict by source address. Internet-exposed MySQL is scanned constantly.

Checking whether something is listening

# Linux / macOS — what is bound to the port
sudo lsof -i :3306
sudo ss -lntp | grep :3306

# Windows
netstat -ano | findstr :3306
Get-NetTCPConnection -LocalPort 3306

# is it reachable from outside?
nc -zv example.com 3306
curl -v telnet://example.com:3306

Freeing the port

# find the process, then stop it
sudo lsof -ti :3306 | xargs kill        # Linux / macOS
netstat -ano | findstr :3306            # note the PID, then:
taskkill /PID <pid> /F                    # Windows

Other common ports

All port numbers