Skip to main content

Connect to MySQL addon

Overview

Apps on Cloudron use an internal MySQL addon. Access the database from inside the server via an SSH tunnel for security.

This guide explains how to connect to the MySQL addon from your local machine.

Database credentials

Get the database credentials:

  1. Open the Web terminal of an app.
  2. Run env | grep CLOUDRON_MYSQL.
  3. Note the credentials. Each app has its own separate database and credentials.

Internal IP address

The internal IP address of the MySQL server is 172.18.30.1.

DB clients

CLI

Connect via MySQL CLI:

  1. Open a Web Terminal.
  2. Click the MySQL button at the top to paste the connection command.
  3. Press Enter to execute the command.

DBeaver

DBeaver is a free multi-platform database tool for developers and database administrators.

To connect:

  1. Create a new MySQL connection in DBeaver.
  2. Fill in the credentials from above:
  1. Configure the SSH tunnel by clicking the SSH tab:

You can now view the database:

MySQL Workbench

MySQL Workbench is a visual tool for database architects, developers, and DBAs.

To connect:

  1. Create a new connection in MySQL Workbench.
  2. Select Standard TCP/IP over SSH as the connection method.
  3. Fill in the credentials from above:

You can now view the database: