When you need to create a mySQL account and database for an I.T. student, do the following:


Log into the itunix.ccm.edu server via putty, and then access mySQL using the following command:


sudo mysql -u root


Use the code below to create a new mySQL database for an I.T. student.  Replace the variables lastname, username, and password with the correct student specific data.


create database lastname;

create user 'username'@'localhost' identified by 'password';

create user 'usernamel'@'192.168.0.254' identified by 'password';

grant all privileges on lastname.* to 'username'@'localhost';

grant all privileges on lastname.* to 'username'@'192.168.0.254';


NOTE:  There are 2 create user statements, the first allows the student to access mySQL from within the server, and the second allows the student to access mySQL from outside the server, usually via mySQL Workbench.