---
title: "Managing databases in Cloud IDE"
date: "2024-02-14T06:18:38+00:00"
summary: "Manage MySQL databases in Cloud IDE: access, edit, and import data using command-line or visual tools. Learn configuration options."
image:
type: "page"
url: "/acquia-cloud-platform/add-ons/cloud-ide/managing-databases-cloud-ide"
id: "2f15f115-1726-4ea4-b2fb-de40a5f61044"
---

Table of contents will be added

When you pull your Cloud Platform application in Cloud IDE, the MySQL data is stored in the `/home/ide/mysql-data` directory. Log files can be viewed in the `/var/log/mysql` directory.

The provided version of MySQL runs on the port 3306 and has a default database with the following details:

*   **Database name**: `drupal`
*   **User**: `drupal`
*   **Password**: `drupal`

If you use the [Acquia require line](/acquia-cloud-platform/manage-apps/code/require-line), your application is automatically connected to the Cloud IDE database.

Note

*   By default, Cloud IDE is shipped with two databases. The default `drupal` database and a `drupal2` database, which is primarily intended to perform Drupal migrations through [Acquia Migrate Accelerate](https://www.drupal.org/project/acquia_migrate).
*   Cloud IDE comes with a [60GB disk](/acquia-cloud-platform/add-ons/ide/resources#ide-container-resources). Your code, database, and files coreside on the same disk, and you need to factor this when importing your application. Also, when you pull your database to the IDE, the database is stored on the disk as a flat file until it is fully imported in the MySQL engine, thus temporarily doubling the size on the disk.
    
    For example, if you have a 20GB Drupal files directory and you try to import a 20GB database, consider the total disk space used on the disk is temporarily 60GB, and will cause the import to fail because you will max out the total disk allocation.
    

You can easily manage databases by using either of the following ways:

*   Using the built-in MySQL command-line client
*   Using a visual database management tool

Managing databases using the MySQL command-line client
------------------------------------------------------

To manage your Cloud IDE databases with the MySQL command-line client:

1.  In the Cloud IDE menu bar, click **Terminal** > **New Terminal**
2.  Connect to the MySQL command-line client with the credentials provided in the preceding section.
    
        ide:~/project (main) $ mysql -u drupal -pdrupal -h localhost
        mysql: [Warning] Using a password on the command line interface can be insecure.
        Welcome to the MySQL monitor.  Commands end with ; or \g.
        Your MySQL connection id is 2
        Server version: 5.7.34 MySQL Community Server (GPL)
        Copyright (c) 2000, 2021, Oracle and/or its affiliates.
        Oracle is a registered trademark of Oracle Corporation and/or its
        affiliates. Other names may be trademarks of their respective
        owners.
        Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
        mysql>
    

Managing databases using a visual database management tool
----------------------------------------------------------

Cloud IDE comes preconfigured with [adminer](https://www.adminer.org/), which is a lightweight and secure one-file database management tool written in PHP.

To manage your Cloud IDE database using a visual database editor:

1.  In the Cloud IDE menu bar, select **Manage Drupal application** and double-click **Open Database Editor**. If you click the **Open Database Editor** option once, you are redirected to your Drupal application instead.
    
    The system displays a new window with your database credentials pre-populated.
    
2.  Click **Login**.
3.  In the left navigation pane, switch databases and select columns.
4.  In the right content pane, edit data as shown on the following screen:
    
    ![GIF demonstrating how to edit the database](https://acquia.widen.net/content/ojbqcq8w5b/web/ide_managing-database.gif?animate=true&u=0b06mk)
    

Altering database configuration
-------------------------------

You can change MySQL options and variables by creating custom configuration files in the `/home/ide/configs/mysql/` directory. After creating or modifying the MySQL configuration file, [restart the database service](resources.html#ide-managing-services) by running the following command:

    acli ide:service-restart mysql

Importing or pushing a local database to IDE or Cloud Platform
--------------------------------------------------------------

To import your local `example.sql` file:

1.  On the Cloud Platform application page, identify the relevant Cloud IDE card and click **Launch Cloud IDE**.
2.  Select **Manage Drupal application** and double-click **Open Database Editor**. If you click the **Open Database Editor** option once, you are redirected to your Drupal application instead.  
    The system displays the database editor in a new tab.
3.  Click **Import**.
4.  Click **Choose** **Files**.
5.  Select your file and click **Execute**.

To push a database from IDE to Cloud Platform, run the `acli push:database` command in the IDE terminal and follow the prompts:

    My IDE:~/project (master) $ acli push:database
    
    Using Cloud Application myapp
    
     Choose a Cloud Platform environment [Dev, dev (vcs: master)]:
    
      [0] Dev, dev (vcs: master)
      [1] Next, next (vcs: tags/2021-02-17)
      [2] RA, ra (vcs: tags/2021-02-17)
      [3] Stage, test (vcs: test_branch)
    
     > 0
    
     ! [NOTE] This is a multisite application. Drupal will load the default site unlessyou have you've configured sites.php for this
    
     !        environment: https://docs.acquia.com/cloud-platform/develop/drupal/multisite/                                 
    
     Choose a database [myapp (default)]:
    
      [0] mysiteDB1
      [1] myDefualtDB (default)
    
     > 0
    
     Overwrite the mysiteDB1 database on dev with a copy of the database from the current machine? (yes/no) [yes]:
    
     > yes