You have been given a database on the EECS server to use for this class. This document describes how to access your MySQL database from a departmental (Hydra) machine, and some tips for using the MySQL interpreter.
You can access the mysql interpreter from the department's hydra machines by typing the following bold-faced mysql command:
mysql -h dbs.eecs.utk.edu -p databasename -u username Enter password: passwordThe second line will be a challenge line issued by the mysql interpreter. You will need to provide the following information:
To change your password, go into mysql and at the prompt type:
set password = password("New Password");
To create tables and populate your tables with data, you might want to place all your create and insert commands into a file and then load that file into mysql. You can load a file of commands into mysql with the following mysql command:
source /home/bvz/cs465/lectures/sql/createdb.sql;where you replace my filename with your file name. Do not use quotes and you must provide the full pathname of the file.
mysql> \! clearwill clear your screen. Similarly,
mysql> \! lswill list the contents of the current directory on a Unix workstation. If it's easier to remember, you can also type system at the mysql prompt, and then your command. For example:
mysql> system clear
You can find more commands and other help by typing "man mysql" into the unix shell