# Choose and change an instance port

> How SQLEye picks default ports 5432 and 3306, finds a free one when taken, and how to change an instance's port while stopped.

Source: https://sqleye.com/docs/instances/ports/ · Last updated: 2026-11-29 · Publisher: CodeROG (https://coderog.com)

PostgreSQL instances default to port 5432 and MySQL to 3306. If that port is taken, SQLEye suggests the next free port, searching up to 500 above the default.

## What ports are valid?

1024 to 65535. A port used by another instance is rejected, and creating an instance on a port that is not available fails with "Port N is not available".

## How do I change a port?

Stop the instance first. Changing the port of a running instance is refused with "stop the instance before changing its port". After the change, SQLEye rewrites the instance's managed config on the next start, so update your app's connection string.

## What if a port is in use at start?

See [port in use](/docs/troubleshooting/port-in-use/).

## Who can connect?

Servers bind to `127.0.0.1` only, so only programs on your machine can connect.
