This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
mysql_databases [2010/09/27 19:37] walter created |
mysql_databases [2013/07/09 22:15] walter |
||
---|---|---|---|
Line 2: | Line 2: | ||
Databases can be created on: | Databases can be created on: | ||
* The ACM server, acm.cs.uic.edu | * The ACM server, acm.cs.uic.edu | ||
- | * Sorbis, linux.cs.uic.edu | + | * The ACM workstations via the script <code>cs480</code> |
+ | |||
+ | |||
+ | Databases can be accessed using: | ||
+ | * The mysql command on the command line in a remote or local shell | ||
+ | * Via [[https://acm.cs.uic.edu/phpmyadmin|PHPMyAdmin]] | ||
+ | |||
+ | ====== Local Workstations Databases ====== | ||
+ | |||
+ | A local database can be created on our workstations using a script call "cs480" | ||
+ | |||
+ | This script will setup and run a database stored in your home directory under your account | ||
+ | |||
+ | When run it will start your mysql server as well as an HTTP server on localhost:8080 with a PHPMyAdmin instance | ||
+ | |||
+ | **Usage:** | ||
+ | <code > | ||
+ | cs480 - Prints help test | ||
+ | cs480 setup - Creates needed files | ||
+ | cs480 start - Starts servers | ||
+ | cs480 stop - Stop server | ||
+ | </code> | ||
====== Creating a database ====== | ====== Creating a database ====== | ||
Line 11: | Line 32: | ||
mysql -u root -p | mysql -u root -p | ||
+ | **SysAdmin has root db password** | ||
databases are created like this: | databases are created like this: | ||
create database mydatabase; | create database mydatabase; | ||
- | GRANT ALL PRIVILEGES ON mydatabase.* to myuser IDENTIFIED BY 'mypassword' with GRANT OPTION; | + | GRANT ALL PRIVILEGES ON mydatabase.* to 'myuser'@'localhost' IDENTIFIED BY 'mypassword' with GRANT OPTION; |
most of the time myuser is the same as the database name. | most of the time myuser is the same as the database name. |