# Fix "Port is already in use"

> Change the instance's port or stop the process that holds it. Commands to find which program is listening on a port on macOS, Linux and Windows.

Source: https://sqleye.com/docs/troubleshooting/port-in-use/ · Last updated: 2026-11-29 · Publisher: CodeROG (https://coderog.com)

Starting an instance fails with this message when its port is busy:

```text
Port 5432 is already in use. Change this instance's port and try again.
```

Either change the instance's port or stop whatever uses it.

## How do I change the port?

1. Stop the instance. The port cannot change while it runs ("stop the instance before changing its port").
2. Change its port to a free number from 1024 to 65535 that no other instance uses.
3. Start it again. Update your app's configuration to the new port.

See [ports](/docs/instances/ports/).

## How do I find what uses a port?

macOS:

```bash
lsof -nP -iTCP:5432 -sTCP:LISTEN
```

Linux:

```bash
ss -ltnp | grep :5432
```

Windows (Command Prompt):

```bat
netstat -ano | findstr :5432
```

Replace 5432 with your port (3306 for MySQL). The last column on Windows is the process id.

## Is it another SQLEye instance or a system database?

A system-wide PostgreSQL or MySQL, or another instance, often holds the default ports 5432 and 3306. When you create an instance, SQLEye suggests the next free port above the default.
