1. Copy the connection string
- Open your project at console.neon.tech.
- Click Connect on the project dashboard.
- Pick the branch, database and role.
- Turn Connection pooling off for the direct connection (recommended for pgquery), then copy the string.
postgresql://neondb_owner:YOUR-PASSWORD@ep-cool-name-123456.eu-central-1.aws.neon.tech/neondb?sslmode=require
2. Paste it into pgquery
Open the app, paste the string and press Connect.
Things to know
- Cold starts. A Neon compute that scaled to zero takes a moment to wake up. If the first connect times out, press Connect again.
- Pooled vs direct. The pooled host (with
-poolerin its name) is meant for apps with many short connections. pgquery opens one connection per request, so the direct host is the simpler choice. - SSL is required. Keep
sslmode=requirein the string. - Branches. Each Neon branch has its own host. Save one pgquery connection per branch to compare them side by side.
Common errors
| If you see | Do this |
|---|---|
i/o timeout (or: context deadline exceeded) | The compute was waking up. Try again; it connects fast once it is running. |
password authentication failed | Reset the role password in the Neon console (Roles) and copy a fresh string. |
… channel_binding … | Remove the channel_binding=require parameter from the string and connect again. |