Skip to content
Node.js Apps

MySQL database for your Node.js app

Create one in a click: we show the connection details once and give you a ready DATABASE_URL.

  1. In your app → Database, enter a name (e.g. main) and click Create database.
  2. Copy and save the details shown: host, port, database, user, password and the connection URL. The password is shown only once.
  3. 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