Port 3306: What's Using It and Is It Safe to Kill?
Port 3306 is the default MySQL and MariaDB port. Here's what listens on it, whether it's safe to stop, and how to find it on macOS.
Port 3306 is the default port for MySQL and MariaDB. If it’s in use on your Mac, you have a database server running, usually a local one you installed for development.
What typically listens on port 3306
- MySQL: The default server port since the beginning. Homebrew, the official installer, and Docker images all use it.
- MariaDB: MySQL’s drop-in fork shares the same 3306 default.
- Bundled stacks: MAMP, XAMPP, and similar dev bundles start MySQL here (MAMP sometimes uses 8889).
By default these bind to 127.0.0.1 only, so the database is reachable from your Mac but not the network.
Is it safe to kill?
The port itself isn’t a system service, so stopping it won’t hurt macOS. But a database is different from a dev server: force-killing it mid-write can leave tables in a bad state.
Shut it down cleanly instead:
brew services stop mysql
# or
mysql.server stop
Only fall back to killing the PID if the server is genuinely hung.
Is it suspicious?
On a machine where you do database work, no. It’s expected. Two things are worth checking: whether you meant to leave MySQL running (it can linger in the background and use memory), and whether it’s bound only to localhost. A 3306 listener on 0.0.0.0 or your LAN IP means the database is exposed, which you almost never want on a laptop.
How to find what’s on port 3306 on macOS
lsof -i :3306
To stop a stuck instance by PID:
kill $(lsof -ti :3306)
Use a plain kill (SIGTERM) first so MySQL can flush and close cleanly. Reserve kill -9 for a server that won’t respond.
Portie shows port 3306 alongside the mysqld process in its live view, so you can confirm at a glance whether your database is running and which install owns the port.