MySQL: Difference between revisions
Jump to navigation
Jump to search
m (→Using ceo) |
No edit summary |
||
Line 5: | Line 5: | ||
Users can create their own MySQL databases through [[ceo]]. Users emailing syscom asking for a MySQL database should be directed to do so. The process is as follows: |
Users can create their own MySQL databases through [[ceo]]. Users emailing syscom asking for a MySQL database should be directed to do so. The process is as follows: |
||
# SSH into any [[Machine_List|CSC machine]]. |
|||
# SSH into <tt>csclub.uwaterloo.ca</tt> |
|||
# Run <tt>ceo</tt>. |
# Run <tt>ceo</tt>. |
||
# Select "Create MySQL database" and follow the instructions. |
# Select "Create MySQL database" and follow the instructions. |
Revision as of 20:02, 25 February 2011
Creating new MySQL databases
Using ceo
Users can create their own MySQL databases through ceo. Users emailing syscom asking for a MySQL database should be directed to do so. The process is as follows:
- SSH into any CSC machine.
- Run ceo.
- Select "Create MySQL database" and follow the instructions.
- Login info will be stored in ceo-mysql-info in your home directory.
- You can now connect to the MySQL database (from caffeine only).
Manually
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.