MySQL Practice 3
Contents
MySQL Practice 3¶
Setup¶
Start by installing MySQL from here: https://dev.mysql.com/downloads/
Follow the instructions from here to setup MySQL on your local machine.
A sample database will be used for the demonstrations of each command. You can find the two SQL scripts DLL.sql and InsertStatements.sql by clicking the links.
After saving the files to your local machine, open your terminal and log in to MySQL console using the following command.
mysql -u root -p
Then you will be prompted to enter your password.

Now execute the following commands. We shall name our database as university
.
CREATE DATABASE university;
USE university;
SOURCE <path_of_DLL.sql_file>;
SOURCE <path_of_InsertStatements.sql_file>;

MYSQL with Terminal¶
Now let’s start refreshing the SQL commands we have learned before.