Step 1
Download the classicmodels
database from the MySQL sample database section.
Step 2
Unzip the downloaded file into a temporary folder. You can use any folder you want. To make it simple, we will unzip the file to the C:\temp
folder.
If you use another operating system such as macOS, Linux, or Unix, please feel free to unzip it to any directory you like.
Step 3
Connect to the MySQL server using the mysql
client program. The mysql
program is located in the bin
directory of the MySQL installation folder.
> mysql -u root -p
Enter password: ********
You will need to enter the password for the root
user account to log in.
Step 4
Use the source
command to load data into the MySQL Server:
mysql> source c:\temp\mysqlsampledatabase.sql
Step 5
Use the SHOW DATABASES
command to list all databases in the current server:
mysql> show databases;
The output will look like the following that includes the newly created classicmodels
database:
+--------------------+
| Database |
+--------------------+
| classicmodels |
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+