The database Info page can be seen by clicking on the database on the Applications page.

Database info page.
Database info page.

The Info page is split into three sections:

Basic Details

The Basic details section shows you the resources available (including any add-on storage), the deployed Location, the database type, and the creation date.

Database basic details.
Database basic details.

Internal Connections

This section shows you the allowed connections and details for internal connections – connections between Kinsta applications and Kinsta databases. Click the Connection details button to view those details. The default port for internal connections is 3306.

Do not copy-paste these details into your environment variables. Use the Add application button to add your application(s). Select the Add environment variables to the application checkbox to populate those environment variables automatically.

Database Internal connections.
Database Internal connections.

To see how to add a connection, see Adding Internal Connections.

Internal Connections and the Build Process

Internal connections are only available during runtime; they are not available during the build process.

If your application tries to connect to a database using an internal connection during the build process, this causes an error that says the database is not running, which makes the build fail. This is expected because the internal connection is not live during the build; it can only be used during runtime.

There are a couple of ways to work around this.

Option 1: Move the logic that connects to the database from the application’s build command to the start command. For example: if you have a command like prisma migrate in the build process and move that command to the start command, your application will only access the database during runtime, and the build will be successful.

Option 2: Add separate environment variables as needed for the database connection, one available for the build process, and the other only for runtime. The keys can be the same (e.g. DB_CONNECTION_URL) as long as one is only available during the build process and the other is only available during runtime. Use the database’s External connection details (Applications > dbname > Info > External connections) for the values of any variables to be used in the build process.

External Connections

This section shows you the connection details for external connections. You can use these details to connect to your database via the command line (CLI) or with a database tool.

Database external connections.
Database external connections.