PDF HTML FlashPaper

SQL102

Contents

  • 1 Technical Requirements
    • 1.1 MySQL Server
    • 1.2 MySQL Workbench
    • 1.3 Install the Northwind Database on MySQL
      • 1.3.1 Windows
      • 1.3.2 Macintosh
  • 2 Class Files

Technical Requirements

MySQL Server

You need to have full administrator access to MySQL. If you do not, you can install a local copy of MySQL Community Server:

  • Download and install the MySQL Community Server appropriate for your system.

MySQL Workbench

  • Download

Install the Northwind Database on MySQL

NOTE: These steps are only after the MySQL Community Server and Workbench are installed. Please restart your computer after installing MySQL. You should have also downloaded the class files below before following these instructions, as it contains the Northwinds Database file(s).

Windows

  1. Open WorkBench.
  2. Click on Open connection to start querying.
  3. Under Stored Connections choose Local MySQL, click okay then enter your password and click okay again.
  4. Chose File>Open SQL Script
  5. In the Webucator Class Files, browse to ClassFiles > Northwind-MySQL.sql.
  6. Click on open, and then click okay.(At this point the Query should load but you may receive a Unknown File Encoding window pop up which all you need to do is click the OK button).
  7. Click on the Execute lightning bolt towards the top of the window.
  8. Next right click inside the Object Browser and refresh, Northwind should appear.
  9. Next click File>New Query Tab.
  10. Select the Northwind database from the Object Browser (it will turn bold.
  11. In the new Query tab type the following to test the database:

          SELECT * FROM Employees;
Click the Execute lightning bolt. If the test is successful, you should see a listing of employees.

Macintosh

  1. Open MySQL Query Browser from the /Applications/MySQLTools directory.
  2. Enter the following values:
    1. Server Host: localhost
    2. Username: root
    3. Password: set during install (defaults to blank)
  3. Click 'OK' to connect.
  4. Go to File > Open Script.
    1. Locate and select the Northwind-MySQL.sql file from the ClassFiles.
    2. In the Text Encoding drop down menu, choose Latin1 from the options.
    3. Click Open.
  5. Click the Execute button in the top toolbar. You should see a message that says Script Executed in the bottom bar of the MySQL Query Browser.
  6. In the MySQL Query Browser Side Window, double click on the Northwind Database. (If you don't see the Northwind Database listed, you will need to Refresh the Schemas window. Using a two-button mouse, you can right-click and choose Refresh from the menu.)
  7. Type of copy the following statement and place it in the Query field. You should see an entry for Nancy Divolio, which is one of the records within the Northwind Database.

          SELECT * FROM Employees WHERE FirstName = 'Nancy';
If the test is successful, you will see a record for Nancy Davolio.

Class Files

  1. Download the class files.
  2. After downloading the class files, create a directory on your hard drive named "Webucator" that can be found easily.
    1. On Windows it is recommended the new folder have a path of C:\Webucator.*
    2. On Mac OS X a good location for the new folder may be in your Documents directory.
  3. Extract the files to the folder you just created.
* If you are using XAMPP (e.g, for PHP classes), you must place the Webucator folder to the C:\xampp\htdocs folder.

  • Instructor-led Online Classes
  • My Classes
  • Class Requirements
  • Setup Support
  • Class Setup Policy
  • FAQs

  • Onsite Classes
  • Class Info

  • Wiki Navigation
  • Login