MySQL
For the most part, managing MySQL databases in Cito is a matter of using the command line. We provide a helper utility for this, psmysql
.
New MySQL databases have a username/password pair associated with them
In Cito, newly created MySQL databases will also issue a username or password at the same time. We automatically generate these if required.
Using PSMySQL to add & view databases
To view your databases, simply run the psmysql
command. Your databases are listed, as per the example below:
cito~ # psmysql
[+] MySQL databases on this server:
+----------+
| Database |
+----------+
| testdb |
+----------+
[+] MySQL users on this server:
+----------+-----------------+
| Username | Connection Host |
+----------+-----------------+
| testuser | localhost |
+----------+-----------------+
To create a new MySQL database in Cito, use: psmysql -n <db name> -u <username> -p <password>
To delete a MySQL database, use: psmysql -d <dbname>
Adding a new database
Invoke psmysql
with the required arguments
A note on credentials
Databases are accessed using a set of credentials for each user. Note these are not the same as the system user password- instead, they are generated the first time you create a database owned by that user.
If you do not specify a username and password with the -u
or -p
flags this will be automatically generated for you.
cito~ # psmysql -n testdb -u testuser
[+] Created MySQL database testdb with user testuser
[+] Created user testuser with password QNOCh2UlfXu5YJziyUfkWr
[+] Please make a note of the MySQL password as it will not be shown again.
If the MySQL user for the specified owner already exists, it will not be modified.
Accessing the MySQL command line
You can also perform common MySQL operations at the MySQL command line. Type mysql
at your admin shell to access this.
PHPMyAdmin
We understand some customers may wish to use the 'PHPMyAdmin' utility to manage their databases graphically. If you wish to enable this, please contact support.