Professional Documents
Culture Documents
2 is to insert the sample database into the MySQL you successfully installed in your
laptop.
We use the classicmodels database as a MySQL sample database to help you work with
MySQL quickly and effectively. The classicmodels database is a retailer of scale models of
classic cars database. It contains typical business data such as customers, products, sales orders,
sales order line items, etc.
We use this sample database in our MySQL tutorials to demonstrate many MySQL features from
simple queries to complex stored procedures.
After uncompressing the mysqlsampledatabase.zip file (download from Google Classroom), you can
load the sample database into MySQL database server by following the below steps.
First, download the classicmodels database from the MySQL sample database section
Second, unzip the downloaded file into a temporary folder named temp as follows:
Third, launch MySQL Workbench from the Program Files and follow the steps below:
Launch MySQL Workbench
Launch MySQL Workbench from the Program files
New Connection
Click New Connection to add a new database connection
Setup New Connection
Enter the connection name e.g., local and click OK button
Connection
Click the local database connection to connect to MySQL database server
Connect to MySQL Server
Enter the password for the root account and click OK
MySQL Workbench
MySQL Workbench is open
Open SQL Script
From the File menu, choose "Open SQL Script..."
Choose SQL Script File
Choose the Sample Database File e.g., c:\temp\mysqlsampledatabase.txt
Refresh All
Right click inside the Schema panel and click Refresh All to update the panel
classicmodels database
The classimodels datababase is loaded successfully into MySQL database server
Test the database by typing the below sql codes in the command line prompt.
1 USE classicmodels;
2 SELECT * FROM customers;
Basically, those statements switch the current database to classicmodels and query data from
the customers table. If you see the customers data returned, you have successfully imported
the sample database into the MySQL database server.
Print screen the important steps as shown to show you had did the installation accordingly.