====== EECS MySQL Account ====== MySQL is a popular open-source relational database...MORE INFO ON MYSQL. * [[database_accounts#Requesting an Account]] * [[database_accounts#Class Accounts vs. Persistent Accounts]] * [[database_accounts#MySQL Account Quota]] * [[database_accounts#Other Restrictions]] * [[database_accounts#MySQL Command Line Client]] * [[database_accounts#Change MySQL Password]] * [[database_accounts#Making a MySQL Database Connection]] * [[database_accounts#MySQL Backups]] * [[database_accounts#PHPMyAdmin Web Client]] * [[database_accounts#Additional MySQL Resources]] ===== Requesting an Account ===== MySQL accounts are available upon request to all students and faculty in the EECS department. If you do not already have an account and would like to start one submit a request for an account by submitting a [[http://www.eecs.ku.edu/help | help ticket]]. Read the follow sections for more information about and restrictions on EECS MySQL Accounts. ===== Class Accounts vs. Persistent Accounts ===== **Class accounts** are created for EECS users enrolled in EECS courses that require database usage (for example [[http://www.eecs.ku.edu/courses/647|EECS 647]]). Class accounts are temporary, and are purged after the course is completed. **Persistent accounts** are created upon request and persist as long as the user's EECS account is active. A class account can be converted into a persistent account by following the procedure described in the section above. ===== MySQL Account Quota ===== Each EECS MySQL Account begins with a **10MB** quota placed upon it. If at anytime the size of a user's database exceeds that of their quota their ability to run ''INSERT'', ''CREATE'', and ''UPDATE'' queries is automatically revoked. If this happens it may cause errors in programs connected to the MySQL database. It is the users responsibility to keep track of the size and status of their MySQL database to prevent such errors from occurring. Database privileges that have been revoked in this fashion will automatically be returned once the size of the database is beneath its designated quota. Each time permissions are revoked or granted a notification email is generated and sent to the user's EECS email address. To view the current status of your MySQL Account visit [[https://www.eecs.ku.edu/account/mysql]]. If you have a compelling reason why the quota on you MySQL Account should be increased, submit a request using the EECS [[http://www.eecs.ku.edu/help|help ticket]] system. ===== Other Restrictions ===== - Each EECS user is limited to a single MySQL database of the same name as the user's EECS username. - Access to the MySQL server is limited to computers on the EECS network. You will not be able to connect directly to your MySQL database from you home computer. - You may not use your EECS MySQL Account for business purposes (an e-commerce website), or to store sensitive information (such as credit card numbers, social security numbers, etc.). - EECS MySQL Accounts are **NOT** backed up! For more information see [[database_accounts#MySQL Backups]]. ===== MySQL Command Line Client ===== To access the MySQL command line client log into ''mysql.eecs.ku.edu'' using your EECS username and password and enter the command below. You will then be prompted to enter your MySQL account password (which you will find on your **EECS MySQL Database Account Handout**). mysql -u username -p To access the MySQL command line client while logged into another [[Cycle Server]] or an EECS Linux workstation user the following command: mysql -h mysql.eecs.ku.edu -u username -p For help with MySQL commands type ''help'', to exit the client type ''exit''. ===== Change MySQL Password ===== To change your MySQL account password login to the MySQL command line client, as described above, and execute the following command: SET PASSWORD = PASSWORD('new_password'); ===== Making a MySQL Database Connection ===== If you would like to make a connection to your MySQL database from a program located on an EECS computer use the following information: * ''hostname: mysql.eecs.ku.edu'' * ''username: your_username'' * ''password: your_password'' * ''database: your_database'' (same as your username) ===== MySQL Backups ===== EECS MySQL Databases are **NOT** backed up! EECS users are responsible for backing up their own MySQL databases. To backup your MySQL database use the following command: mysqldump -u username -p username > backup.sql If it is important that your database be backed up regularly use ''crontab'' to automate your backups. ===== PHPMyAdmin Web Client ===== You can also access your EECS MySQL database using the PHPMyAdmin web client from any web browser at [[https://mysql.eecs.ku.edu]]. Use your MySQL account username and password to access. ===== Additional MySQL Resources ===== For additinonal information about the command line client and MySQL syntax visit the [[http://www.mysql.com|MySQL manual]].