Tools / Port checker / 3306
Is port 3306 open?
Port 3306 is MySQL / MariaDB. Enter your server below to test it from Dallas, Amsterdam and London.
What port 3306 is used for
Default port for MySQL and MariaDB database servers. Applications on the same server normally connect through localhost or a Unix socket instead.
Should port 3306 be open?
Should not face the internet directly. Bind to 127.0.0.1 or a private network. If remote access is required, allow only specific addresses and require TLS.
How to open port 3306
Ubuntu or Debian with ufw, allowing only your own address (replace 203.0.113.10):
sudo ufw allow from 203.0.113.10 to any port 3306 proto tcp
Rocky, Alma or CentOS with firewalld:
sudo firewall-cmd --permanent --add-port=3306/tcp && sudo firewall-cmd --reload
Windows Server, in PowerShell as administrator:
New-NetFirewallRule -DisplayName "Port 3306" -Direction Inbound -Protocol TCP -LocalPort 3306 -Action Allow
Then check that the service listens on all addresses, not only 127.0.0.1, and test again above.
Check another port
Run your service on a PrivateByte server: a firewall you control and every port yours to open.