Difference between revisions of "MySQL"

From CSCWiki
Jump to navigation Jump to search
m (added to Software category)
(note that this can be done through ceo)
Line 1: Line 1:
 
==== Creating new MySQL databases ====
 
==== Creating new MySQL databases ====
  +
  +
Users can now create their own MySQL databases through [[ceo]]. To create a MySQL database manually:
   
 
$ mysql -uroot -p
 
$ mysql -uroot -p

Revision as of 11:23, 16 January 2010

Creating new MySQL databases

Users can now create their own MySQL databases through ceo. To create a MySQL database manually:

$ mysql -uroot -p
Enter password: ******

mysql> CREATE DATABASE someusername;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON someusername.* to someusername@localhost IDENTIFIED BY 'longrandompassword';
Query OK, 0 rows affected (0.06 sec)

For random passwords run 'makepasswd --chars 20'. For the administrative password for the cluster see /users/sysadmin/passwords/mysql.

Write a file (usually ~club/mysql) to the club's homedir readable only by them containing the following:

Username: clubuserid
Password: longrandompassword
Hostname: localhost

Try not to send passwords via plaintext email.