1. Ports
  2. Port 3307

What Range This Port Belongs To

Port 3307 sits in the registered ports range (1024–49151), the middle tier of the port address space. IANA manages this range and accepts registrations from software vendors — but port 3307 has no registered owner. It's officially unassigned.

That means no RFC defines it. No standards body governs it. Any service can use it, and nothing guarantees what you'll find there.

What Actually Runs on Port 3307

In practice, port 3307 means one thing to almost everyone who encounters it: a second MySQL instance.

MySQL runs on port 3306 by default. But sometimes you need two:

  • Replication setups — running a replica on the same machine as the primary, which requires a different port
  • Docker and containers — mapping a containerized MySQL to the host with -p 3307:3306, keeping the host's native MySQL on 3306 untouched
  • Development environments — running a local test database alongside a production database without conflict
  • XAMPP/WAMP stacks — where a bundled MySQL conflicts with a separately installed one

Nobody officially designated 3307 for this. It simply became the convention because it's one above 3306, easy to remember, and unlikely to conflict with anything else.1

How to Check What's Listening on Port 3307

On macOS and Linux:

lsof -i :3307

On Linux (alternative):

ss -tlnp | grep 3307

On Windows:

netstat -ano | findstr :3307

If you see a MySQL process, that's almost certainly what it is. If you see something else entirely, that's the nature of unassigned ports — anyone can move in.

Why Unassigned Ports Matter

The port system works because most of it is predictable. Port 443 is HTTPS. Port 22 is SSH. You can write software that assumes this.

Unassigned ports are the gaps between those certainties. They exist because the 65,535-port address space is large and most applications only need a handful of well-known addresses. The registered range fills in with services that need a stable home — database engines, development tools, internal protocols — but IANA can't assign every port, and it doesn't try.

The result is that some ports develop informal conventions through sheer usage. Port 3307 is one of them: not standardized, not documented in any RFC, but understood by any developer who has ever needed to run MySQL twice.

Security Consideration

Because 3307 is unassigned, a firewall that blocks "non-standard database ports" may or may not block it — depending on whether the administrator knows about this convention. If you expose port 3307 to the Internet on a server running a MySQL replica, that replica is just as exposed as a MySQL instance on 3306. The port number provides no security. Authentication does.2

A fost utilă această pagină?

😔
🤨
😃