MySQL for PHP Setup
Instructions
Windows and Mac Users
Creating the Webucator Folder
The first step to setting up for your course is to create the folder in which you will store your class files: Create a new folder named Webucator wherever you want, but make sure you remember where it is.
Getting the Class Files
Download the class files zip from the Course Overview + Class Files page of your course.
Instructions for Windows Users
(Instructions for Mac users are below)
Install the MySQL Community Server
- Download the latest version of MySQL Community Server. If you already have an older version installed, it should work fine for this class.
- It should pre-select your operating system. Click the Go to Download Page button:
- Click the Download button for the mysql-installer-web-community file:
- You will be offered the opportunity to create an account. You don't need to do this. Click the No thanks, just start my download link to download the installer. You can download it wherever you like.
- It should pre-select your operating system. Click the Go to Download Page button:
- Run the installer by opening the downloaded file:
- Choosing a Setup Type: Select Custom as click Next >.
- Select Product and Features: Select MySQL Server and MySQL Workbench and then click Next >:
- Installation: This shows what will be installed.
Click the Execute button at the bottom. - Once the products are installed, the Status will change to Complete. Click Next >.
- Continue to click Next > until you get to Accounts and Roles. Enter a strong password (don't forget it!) and click Next >.
- Continue to click Next > until you get to Apply Configuration. Click Execute:
- Product Configuration: Click Next >.
- Installation Complete: Check the box to start MySQL Workbench and click Next >.
Install the Northwind Database
- Open MySQL Workbench if it's not open already and click local under MySQL Connections:
- Enter your password:
- Click the second icon from the left to open a SQL script:
- From your class files, open setup\Northwind-MySQL.sql:
- Execute the script by clicking on the lightning bolt:
- Under Schemas on the left, click the refresh icon:
- The Northwind database should now show up:
- Select New Query Tab from the File menu:
- In the New Query Tab, enter:
SELECT * FROM Employees;
And press the lightning bolt to run the query. You should get a result set like the one below:
Instructions for Mac Users
Install the MySQL Community Server
- Download the latest version of MySQL Community Server. If you already have an older version installed, it should work fine for this class.
- It should pre-select your operating system. Click the Download button for the DMG Archive:
- You will be offered the opportunity to create an account. You don't need to do this. Click the No thanks, just start my download link to download the installer. You can download it wherever you like.
- It should pre-select your operating system. Click the Download button for the DMG Archive:
- Run the installer by opening the downloaded DMG file:
- Click through the installer accepting the defaults. When you get to the Password Encryption option, choose Use Strong Password Encryption:
- Enter a strong password (don't forget it), leave Start MySQL Server once the installation is complete checked, and click Finish:
- You can then move the installer to Trash.
Install MySQL Workbench
- Download MySQL Workbench.
- It should pre-select your operating system. Click the Download button for the DMG Archive:
- You will be offered the opportunity to create an account. You don't need to do this. Click the No thanks, just start my download link to download the installer. You can download it wherever you like.
- It should pre-select your operating system. Click the Download button for the DMG Archive:
- Run the installer by opening the downloaded DMG file and then dragging the resulting MySQLWorkbench.app into the Applications folder:
Install the Northwind Database
- Press Cmd+Space and enter MySQLWorkbench, then double-click MySQLWorkbench.app to open it.
- Click Local Instance 3306 under MySQL Connections:
- Enter your password:
- Click the second icon from the left to open a SQL script:
- From your class files, open setup\Northwind-MySQL.sql:
- Execute the script by clicking on the lightning bolt:
- Under Schemas on the left, click the refresh icon:
- The Northwind database should now show up:
- Select New Query Tab from the File menu:
- In the new Query tab, enter:
SELECT * FROM Employees
;
Press the lightning bolt to run the query. You should get a result set like the one below: