This topic describes several different ways you can access and administer your Cloud Platform application’s Drupal database. For most of these tools, you will need the connection details and credentials for the database. See Viewing database information for information about where to find these.
You can access and administer your application’s Drupal database using a desktop application that supports SSH tunneling. It specifies that you are connecting to the database through an SSH connection, using the same private key authentication that you use to SSH to the infrastructure. Here are some options to consider:
In a local terminal, run:
ssh -L $LOCAL_PORT:$DB_HOST:3306 $SSH_URL
Here,
LOCAL_PORT is the port to which Workbench must connect when using localhost.DB_HOST is the database hostname obtained from the preceding stepsSSH_URL is the full SSH connection string from the preceding step. For example, [email protected].Acquia does not recommend you to use phpMyAdmin on Cloud Platform. This software can expose your application to unnecessary risk, especially if the software is not up-to-date. phpMyAdmin is not officially supported on Cloud Next, and subscribers can leverage alternative solutions.
You can also access your database over SSH and use MySQL’s command line. For more information, see Accessing your database from the command line.
You can use database management tools to perform the following tasks:
You can’t use database tools to create new databases in Cloud Platform. If you need a new database, use the Databases page in the Cloud Platform interface, or the POST /applications/{applicationUuid}/databases Cloud Platform API endpoint. For an example implementation, download this example database creation script.
If you have a Cloud Platform Enterprise application running on the Cloud Classic infrastructure, it includes a highly available database cluster, using bi-directional replication between database pairs. Each database has an active and inactive infrastructure. If you run intensive processes, such as database backups, against the active infrastructure of a live application, it can impair the performance of your production website. Tools in Cloud Platform, such as its user interface and the API, run against the inactive database infrastructure to avoid this performance impact. However, some other database tools run against the active database infrastructure. For example, running the mysqldump or drush sql-sync command from the command line. Therefore, you should use the Cloud Platform database tools for larger operations, such as database dumps. For example, if you want to create a database backup from the command line, you can use a Drush Cloud command similar to the following:
drush @[site].[env] ac-database-instance-backup [db name]substituting your own website, environment, and database names. The database backup will run against the inactive database, avoiding any performance impact on your active database.
For environments running on Cloud Next, the preceding command is not available. Therefore, you must use Acquia CLI, Acquia Cloud API v2, or the Cloud Platform user interface to create database backups.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
In a local terminal, run:
ssh -L $LOCAL_PORT:$DB_HOST:3306 $SSH_URL
Here,
LOCAL_PORT is the port to which Workbench must connect when using localhost.DB_HOST is the database hostname obtained from the preceding stepsSSH_URL is the full SSH connection string from the preceding step. For example, [email protected].Acquia does not recommend you to use phpMyAdmin on Cloud Platform. This software can expose your application to unnecessary risk, especially if the software is not up-to-date. phpMyAdmin is not officially supported on Cloud Next, and subscribers can leverage alternative solutions.
You can also access your database over SSH and use MySQL’s command line. For more information, see Accessing your database from the command line.
You can use database management tools to perform the following tasks:
You can’t use database tools to create new databases in Cloud Platform. If you need a new database, use the Databases page in the Cloud Platform interface, or the POST /applications/{applicationUuid}/databases Cloud Platform API endpoint. For an example implementation, download this example database creation script.
If you have a Cloud Platform Enterprise application running on the Cloud Classic infrastructure, it includes a highly available database cluster, using bi-directional replication between database pairs. Each database has an active and inactive infrastructure. If you run intensive processes, such as database backups, against the active infrastructure of a live application, it can impair the performance of your production website. Tools in Cloud Platform, such as its user interface and the API, run against the inactive database infrastructure to avoid this performance impact. However, some other database tools run against the active database infrastructure. For example, running the mysqldump or drush sql-sync command from the command line. Therefore, you should use the Cloud Platform database tools for larger operations, such as database dumps. For example, if you want to create a database backup from the command line, you can use a Drush Cloud command similar to the following:
drush @[site].[env] ac-database-instance-backup [db name]substituting your own website, environment, and database names. The database backup will run against the inactive database, avoiding any performance impact on your active database.
For environments running on Cloud Next, the preceding command is not available. Therefore, you must use Acquia CLI, Acquia Cloud API v2, or the Cloud Platform user interface to create database backups.
If this content did not answer your questions, try searching or contacting our support team for further assistance.