- In your app → Database, enter a name (e.g. main) and click Create database.
- Copy and save the details shown: host, port, database, user, password and the connection URL. The password is shown only once.
- The first database is wired up automatically: we add DATABASE_URL (secret) to your variables. Restart or deploy the app to pick it up.
Example DATABASE_URL
mysql://user:[email protected]:3306/database
It works with Prisma, Sequelize, Knex, TypeORM, mysql2 and any MySQL client. To run migrations use the console (e.g. npx prisma migrate deploy).
More you can do
- New password: generates another one and the old one stops working immediately (remember to update DATABASE_URL in Variables).
- Delete: type the database name to confirm. All its tables and data are deleted.
How many databases you get depends on your plan (1, 3, 5 or 10). The database only accepts connections from the same server, not from outside.
Ask the assistant
Still have a question about this? Ask the assistant.
Was this article helpful?
Related articles
- Environment variables for your Node.js appAPI keys, passwords and settings your app reads from process.env, encrypted and with secret values.
- Run commands in your app (console)Migrations, seeds or one-off scripts in the live version, with your app's variables.
- Create your first Node.js app from GitHubConnect your repository, pick the branch and we'll put your app online with HTTPS in minutes.