- Use ssh or putty or something similar to log
into satoshi.cis.uncw.edu, using your UNCW credentials. If you are off campus, you will have to VPN in to access satoshi.
- At the UNIX shell prompt, download the two files named below using the wget utility. This will download the two files from the people
web server to the local machine, i.e. the file system on satoshi.
Instead of typing it out, it may be simpler to copy and paste the
commands below.
- wget http://people.uncw.edu/narayans/courses/csc455/UniversityDatabase/create_univ_database.sql
- wget http://people.uncw.edu/narayans/courses/csc455/UniversityDatabase/smallRelationsInsertFile.sql
- Start the mysql client using: mysql –p and type in your MySql password (contained in the email from root). This may be different from the password you used to log into satoshi.
- At the MySql prompt, select your database by using the command: use
your_user_name, for example use xyz1234;
- Use the commands below
to execute the sql commands in the two downloaded files. Note that there are no quotes around the filename. This executes all the sql
statements contained in the named file as though you had typed those commands
one-by-one at the mysql command line.
SET foreign_key_checks = 0;
- source create_univ_database.sql;
- source smallRelationsInsertFile.sql;
SET foreign_key_checks = 1;
- Explore sql by writing queries. Your textbook
has numerous examples in Chap 3.