Question


I need to access the OnApp database in MySQL on my Control Panel server.


Environment


OnApp Cloud (all versions)


Answer



Directly accessing the OnApp database on the server can result in serious errors in your cloud that may not be reversible. Before making any changes to the database records, it is strongly recommended to backup your data by using mysqldump.

To access the OnApp database:

  1. Log in to your Control Panel server and run the following command:
cat /onapp/interface/config/database.yml
CODE

In most installations, the MySQL server resides on the Control Panel server, the user is root, and the database name is OnApp. The above command provides the properties, such as host, user, database, and password.

       2. At the MySQL command prompt, enter the following:

mysql -u root -p
CODE

       3. Enter the password from the database.yml file:

mysql>
CODE

         4. To select the OnApp database for usage, run the following command:

mysql> use onapp;
CODE