Setup mySql and install some textbook databases on your machine

I assiume that you are running XAMPP on Windows; the steps are similar for other setups

  1. Download the "small databases" ZIP file (linked from schedule page) to your computer;
  2. extract the three .sql files (simpsons, world, and imdb_small)
  3. Make sure that mySQL is running on your system (XAMPP control panel)
    mysql running
  4. In a web browser, go to localhost/phpmyadmin
    (on some systems, phpMyAdmin)
    phpmyadmin after first login
  5. It is recommended that you create a password for the root account (I'm not sure how to recover your data if you ever forget the password)
    1. In phpmyadmin, click the Users tab at the top.
    2. Find the row that has User root and Host 127.0.0.1
      select root user
    3. Click Edit Privileges
      edit root privileges
    4. Click Change password
    5. Enter the password twice (write it down somewhere if you're not sure you can remember it)
    6. Click the Gobutton
    7. Repeat this process for root at localhost, using the same password
  6. At this point you may not be able to connect to phpmyadmin.
    Go to the C:\xampp\phpMyAdmin the folder, edit the file config.inc.php (on some systems it is called config.default.php),
    to set $cfg['Servers'][$i]['password'] = 'yourrootpassword';.
    Note: if you use Notepad to edit this file, it may appear to be all on one line.
    I recommend that you use a better editor, such as Notepad++ or Eclipse.
  7. You should now be able to connect to phpmyadmin again.
  8. Click Databases tab at the top of the page.
  9. Populate the simpsons database: simpsons DB installed
  10. Repeat the previous step for world and imdb_small databases
  11. You should now be ready to do some queries:
    Choose the simpsons database again and click the Query Window icon the icon at the top of the Navigation Frame