Using the Dashboard
You can manage MySQL databases from Site Settings, or alternatively from the Databases page in the dashboard.
You can use the search bar to filter for specific databases. You can also use the ‘All servers’ checkbox to search for databases on other servers, if you have more than one.
From Sites, you can navigate to Settings and then the ‘Databases’ section, to see a list of databases owned by that site.
To add a new database, simply click the “Create Database” link in the top right corner of the dashboard.
You will be prompted for a database name, username and password. The username and password will be automatically generated if left blank.
You may also need to select an owner for the database- this is a site that is associated with the database.
Once created, you will see the new database details displayed to you.
MySQL passwords are not shownWe do not display MySQL passwords by default- you can click the icon next to the password field to copy it to your clipboard. If you lose access to a MySQL password you’ll need to reset it.
Cloning databases
It can be useful to clone a MySQL database, for example if you need a copy of it for testing purposes. Cloning a database generates a new MySQL user. Existing grants and privileges are not copied.
To clone a MySQL database, click the Clone icon in the actions menu on the databases page.
You’ll need to specify a new username and password for the MySQL user, as well as a new name for the database.
Once done, click Clone to start the process. Large databases may take a few moments to complete.
Managing MySQL Users
You can manage MySQL users by clicking the User icon next to the database. This will allow you to add additional MySQL users, set permissions, or reset a user’s MySQL password.
This also allows you to set specific privileges for MySQL users- for example, you can create a read-only user with only the SELECT privilege on your database.
Using PHPMyAdmin
Some customers may wish to use the ‘PHPMyAdmin’ utility to manage their databases graphically. PHPMyAdmin is accessible from the “Tools” section of the left navigation menu.
Accessing the MySQL command line
You can also perform common MySQL operations at the MySQL command line. You must be logged in as admin to do this.
Importing data from a SQL dump
You may wish to import MySQL data into a newly-created database, using a .sql file created using mysqldump or similar.
To do this, issue the following as the admin user.
mysql <dbname> < export.sql
Substitute <dbname> for the database name and export.sql for the filename of your MySQL data.
Remote MySQL database access
For security purposes, remote access to MySQL is disallowed by default. Please contact support if you need to remotely connect to MySQL using a tool such as MySQL workbench or HeidiSQL.
Orphaned databases
In Cito all databases are owned (i.e. associated with) a site. This makes it easy to track what databases belong to a site.
We attempt to automatically detect databases and link them to a site, but in some cases this is not possible.
If you see a message about an Orphaned database, you can find that database and use the dropdown menu to assign it to a site. This only needs to be done once.
More information can be found at Database ownership.