MySQL usage (for 2503ICT WP) ============================ The purpose of this message is to give you some details of your MySQL account on host dwarf.ict.griffith.edu.au and how to use it. Your MySQL username is your normal student id, s1234567. Your MySQL password has been automatically generated and cannot be changed. You should save it on your computer so you can cut and paste it as required. Your MySQL database name is your normal student id followed by "db", e.g., s1234567db. Your password is available from any member of the 2503ICT teaching team. Please note that this password is NOT synchronised with other passwords, and will not change when others change. This account gives you full access to your own database but to no others. If you do not have a MySQL account, you should ensure you obtain one asap, and meantime can use the common course account available from your teacher. A mirror of the MySQL documentation is available at http://dwarf.ict.griffith.edu.au/mysql_doc/ (the original is at http://dev.mysql.com/doc/mysql/en/index.html). To connect to your MySQL database on dwarf, there are three approaches: 1. Command line tools: $ mysql -h mysql -u s1234567 -ppassword -D s1234567db MySQL welcome message ... mysql> (Note that there is no space between the p and the password.) You can then enter SQL statements terminated by semicolon. Type "help;" for MySQL help. If, for some reason, this does not work, try using "/usr/bin/mysql" instead of "mysql" in the above shell command. It may be convenient to add the line alias mysql="/usr/bin/mysql -u s1234567 -ppassword -D s1234567db" to your .bashrc file to save typing the line each time. You can do this using the editor vi or by giving the following commands: $ cat >> ~/.bashrc alias mysql="/usr/bin/mysql -u s1234567 -ppassword -D s1234567db" control-D $ source ~/.bashrc 2. phpMyAdmin utility Point your browser to the URL http://dwarf.ict.griffith.edu.au/phpMyAdmin/ and enter your MySQL username and password. Usage is then fairly intuitive. 3. From with a PHP program. See the 2503ICT lecture notes for advice on how to do this. Other details and suggestions are given in 2503ICT Labs. David, Anthony and Rodney