Skip to main content
Every Pxxl database has a host, a port, a username, a password and a database name. Your app combines them into a connection URL. This page shows where to find them, the URL format for each engine, and working code.

Find the credentials

Open the database and select Connection. It lists: Revealing a secret needs a recent sign-in. If you signed in more than 10 minutes ago, Pxxl asks you to confirm it’s you. From the CLI:
The port is never the engine’s default. A URL with :5432 or :3306 won’t reach a Pxxl database. Copy the port from the Connection tab.

URL format by engine

For MySQL and MariaDB, the dashboard’s Database URL is written in the Go driver’s style, mysql://USER:PASSWORD@tcp(HOST:PORT)/DATABASE. Most other clients (Node.js, PHP, Prisma, Python) expect the form in the table. Build it from the host, port, username and password fields.
If your password contains characters such as @, / or #, URL-encode them (@ becomes %40).

Add it to your project

1

Add the variable

In your project, open Environment variables and add DATABASE_URL with the URL as its value. If you create the database from inside the project, Add DATABASE_URL does this for you.
2

Redeploy

Running apps only see new variables after a redeploy or restart.
3

Read it in your code

Use process.env.DATABASE_URL, os.environ["DATABASE_URL"] or your framework’s equivalent.
Pxxl only ever sets DATABASE_URL, whatever the engine. If your code expects REDIS_URL or MONGODB_URI, add that variable yourself with the same value.
Don’t use localhost or 127.0.0.1. Inside your app’s container, localhost is the container itself. Use the host Pxxl shows.

Examples

Connect from your computer

Use any client: psql, TablePlus, DBeaver, MongoDB Compass, redis-cli.
If you’ve set allowed IPs, add your own address first, or the connection is refused.

Encryption in transit

Connections go through Pxxl’s database proxy as plain TCP. The engines don’t enforce TLS yet, so treat the password as the main protection: keep it secret, rotate it if it leaks, and restrict access with allowed IPs.

If it doesn’t connect

More in database troubleshooting.