Skip to content

MySQL Info

Stratus provides easy access to the MySQL configuration values and processes.

There is currently no phpMyAdmin or other visual DB editor available on Stratus. It is recommended to utilize mysql-cli, or remote MySQL connection

  • To restart the MySQL server instance, click RESTART.
  • To copy any field, click the Copy Icon in the upper-right of any field.

Using MySQL Commands

The database on a Mojo Stratus instance can be accessed directly via the mysql command or the n98-magerun and n98-magerun2 (Magento 2) tools can be used with credentials already set in local.xml or env.php of the Magento store.

Connecting to the database

Use the value shown in the Connection Details field to access the database via Command Line Interface (CLI):

mysql -h mysql -uUSERNAME -pPASSWORD DATABASENAME

To run the n98-magerun commands, use the following CLI commands via SSH:

  • For Magento 1: n98-magerun db:console
  • For Magento 2: n98-magerun2 db:console

Dropping and Recreating a Database

Using the database credentials, a MySQL database can be dropped and recreated:

mysqladmin -h mysql -uUSERNAME -pPASSWORD drop DATABASENAME
mysqladmin -h mysql -uUSERNAME -pPASSWORD create DATABASENAME