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, 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 adrupal2
database, which is primarily intended to perform Drupal migrations through Acquia Migrate Accelerate. Cloud IDE comes with a 60GB disk. 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:
- In the Cloud IDE menu bar, click Terminal > New Terminal
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, 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:
In the Cloud IDE menu bar, click Manage Drupal Application > Open Database Editor.
The system displays a new window with your database credentials pre-populated.
- Click Login.
- In the left navigation pane, switch databases and select columns.
In the right content pane, edit data as shown on the following screen:
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 by running the following command:
acli ide:service-restart mysql