-->

Load Sample Database

SummaryIn this lesson, we will learn how to load the MySQL sample database into MySQL database server using MySQL Workbench. After the tutorial, you will have company sample database loaded into MySQL server for practicing and learning MySQL.

Easy Step for Load Sample Database

Step 1. Download the company database from the MySQL sample database section.
Step 2. Extract the downloaded file into any folder.
Step 3. Launch MySQL Workbench application which had installed in previous lesson.
Step 4. To add a new database connection just click on New Connection
Step 5. You must enter all connection parameters on this Setup New Connection window. The following information is required:
  • Connection name: the name of the connection. If you connect to the localhost , just type local. In case you connect to a specific host, use the host name for the name of the connection to make it clear.
  • Host name: in this case it is 127.0.0.1 i.e., localhost . You can enter either IP address or the name of the database server.
  • Username: the user that you use connect to the MySQL database. In this case it it the root user.
  • Password: the password of the user that you use to connect to the database.
  • Default Schema: is the database that you want to connect. You can leave it blank and select later.
You should click on Test Connection to make sure that the parameters you provided are correct, and then click OK button to create a new connection. Once you complete, you will see connections window.
Step 6. Open SQL Script by choosing File > Open SQL Script .

Step 7. Choose SQL Script File by selecting the downloaded file company
Step 8. To execute SQL Script, you click execute button from the toolbar as following:
Step 9. Right click inside the Schemas panel and click Refresh All button to update the panel. The company database is loaded successfully into MySQL database server.
In this tutorial, we have shown you step by step how to load the MySQL sample database into MySQL database server using MySQL Workbench.


Download MySQL Sample Database MySQL SELECT