Port 3306 · TCP

Port 3306: MySQL / MariaDB

The default port of MySQL and MariaDB databases.

Protocol
TCP
On Windows
mysqld.exe
Risk if open to the internet
High

Seeing it on your PC

A listener on 3306 means a database server is installed, often by XAMPP, WAMP or a development tool.

Should you block it?

Bind it to 127.0.0.1 unless another machine needs it, and never expose it to the internet.

Check it on your PC

Run this in PowerShell to see what is using port 3306 right now, and which program owns it:

Get-NetTCPConnection -LocalPort 3306 -ErrorAction SilentlyContinue | Select-Object LocalAddress,LocalPort,RemoteAddress,RemotePort,State,@{n='Process';e={(Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue).ProcessName}}

No output means nothing is using the port at the moment. For every connection at once, paste netstat -ano into the netstat explainer.

Block it in Windows Firewall

In PowerShell run as administrator, this stops other computers from connecting to this port on your PC. It does not stop your own programs connecting out.

New-NetFirewallRule -DisplayName "Block inbound TCP 3306" -Direction Inbound -Protocol TCP -LocalPort 3306 -Action Block

Undo it with Remove-NetFirewallRule -DisplayName "Block inbound …", using the same name. If you depend on the service on your local network, this rule stops that too.