User Tools

Site Tools


mysql_management

MySQL Management

On the main cluster MySQL is installed on file server 1.

The MySQL databases are dumped to disk weekly and the dumps are backed up to the HPC backup space.

New Database and User

To create a new database for a specific user, log in to the file server and run mysql (the MySQL root password is configured in .my.cnf, so you will log on automatically). In the “create user” command below, the 'node%' is literal and means: “all hosts with names starting with node”.

show databases;
create database DATABASENAME;
create user 'USERNAME'@'node%' identified by 'PASSWORD';
grant all privileges on DATABASENAME . * TO 'username'@'node%';

To access the new database, the user would then use this command (from the head node):

mysql -p -h fs1 -u USERNAME DATABASENAME
mysql_management.txt · Last modified: 2018/09/27 15:10 by root