Connect to Your Database
Use your connection string to connect from any PostgreSQL client, application, or ORM.
Your Connection String
After creating a database, you'll receive a connection string in this format:
postgresql://postgres:YOUR_PASSWORD@abc123.server1.phoenixdb.space:5432/mydb?sslmode=require
postgres
Username (always postgres)
YOUR_PASSWORD
Password (generated at creation)
abc123.server1.phoenixdb.space
Host (unique subdomain)
5432
Port (standard PostgreSQL)
Connect with psql
The simplest way to test your connection is with the psql command-line tool:
$ psql "postgresql://postgres:YOUR_PASSWORD@abc123.server1.phoenixdb.space:5432/mydb?sslmode=require"
Once connected, you can run SQL queries directly:
mydb=> SELECT version();
Using Environment Variables
We recommend storing your connection string as an environment variable:
DATABASE_URL="postgresql://postgres:YOUR_PASSWORD@abc123.server1.phoenixdb.space:5432/mydb?sslmode=require"
Security Tip: Never commit connection strings to version control. Use .env files and add them to .gitignore.
SSL is Always Enabled
All PhoenixDB connections use SSL encryption by default. The sslmode=require parameter in your connection string ensures encrypted connections. No additional configuration needed.