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.

Common questions

Is it safe to kill the process on port 3306?

It stops your local MySQL or MariaDB server, which is safe for the system. But shut it down gracefully with brew services stop mysql or mysql.server stop rather than kill -9, so the database closes cleanly and avoids corrupting tables.

What is using port 3306 on my Mac?

Almost always a local MySQL or MariaDB install, often started by Homebrew, Docker, or a bundle like MAMP. Run lsof -i :3306 to confirm the process.

Should port 3306 be open to the internet?

No. MySQL should listen on localhost only. A 3306 port reachable from outside your machine is a serious security risk and a frequent target for automated attacks.

Try Portie Free

See every open port on your Mac, which app owns it, and kill processes from the list.

Download Free