Average time to complete: 3-5 hours
In this lab, you will install MySQL on your computer and use both Beekeeper Studio and the MySQL Command Line Client to interact with the database server.
You’ll need a Windows computer for labs 1 and 2.
Note for Mac users: I recommend that you use a Windows computer for this lab. Although it’s possible to install MySQL on a Mac, the instructional videos I provide are geared to Windows users. Also, you will need a Windows computer for Lab 2 (since Microsoft Access is not available for Mac) and for the project. If you don’t own or have access to a Windows computer, you can use a Windows virtual machine, or a computer in CSLAB.
Lab assignments in this class have a relaxed collaboration policy. You may give and receive help freely, and do not need to include an academic integrity statement to report the help. If you choose to work on this lab at the same time as another student, each of you must do the steps on your own computer.
You may use generative AI to help you deal with any errors you may encounter while working through this lab.
Download the MySQL Server here: https://dev.mysql.com/downloads/mysql/
I recommend choosing the first option (“Windows (x86, 64-bit), MSI Installer”). When you click Download, you’ll see options to login or sign up. There’s also a “No thanks, just start my download” option (recommended).
Run the installer. Pick the Typical setup type. When the installer finishes, click Finish. The MySQL Configurator will start.
Use the Windows terminal to complete the following, using the techniques demonstrated in the MySQL 1 and 2 videos. As you work, copy the commands that you type and the resulting output in the terminal to a Word document underneath a heading “Part 1 Transcript.” Don’t take screenshots (they’re often not readable in reports); I want a transcript.
lab1. Use the USE DATABASE command to switch to the lab1 database.
Use the SHOW TABLES command to verify there are no tables in it. Create a table named Animals with two columns: an ID INT, and a Name VARCHAR(30). Use the INSERT statement to insert three records into it. Then use the UPDATE statement to change the name of one of the animals. Then use the SELECT statement to show the records in Animals.mysqldump command to export the lab1 database to a file named lab1.sql. Open the lab1.sql and verify that it contains the Animals table and data.DROP DATABASE command to delete the lab1 database. Then use the CREATE DATABASE command to create an empty lab1 database. The SHOW TABLES command should show that it is empty at this point. Exit the MySQL Command Line.mysql command to execute the lab1.sql commands to recreate your lab1 data.USE DATABASE command to open the lab1 database, and execute a SELECT statement to show the contents of the Animals table.Download Beekeeper Studio here: https://www.beekeeperstudio.io/get (note the option to skip entering an email address)
Install Beekeeper Studio and use it to complete the following steps, following the techniques given in the MySQL 3 video:
CREATE DATABASE command to create a new database named lab1_copy. Select lab1_copy in the database dropdown (you may need to refresh to see it).CREATE TABLE statement to create a table with at least 3 columns containing whatever information you wish. Make sure to define a primary key. Open the table, add a couple of records, and save. Take a screen shot.Submit a PDF lab report to Canvas named report.pdf that consists of the following:
lab1.sql (copy and paste from Beekeeper Studio editor).