Passwords and connection strings are revealed only when requested. Treat them as secrets.
Connect a project
1
Link the database
Open the project overview, choose the database connection action, select the instance, and confirm the link.
2
Add environment variables
Add
DATABASE_URL, or add the individual host, port, database, user, and password values required by your framework.3
Redeploy the project
Save the variables and start a new deployment. New values are loaded when the container starts.
localhost inside a project container points to that container, not to the database.
Common environment variables
PostgreSQL
MySQL
Connection flow
Connection checklist
If the connection still fails, check Monitoring and the database troubleshooting guide.
