Accessing MySQL on VB.NET using MySQL Connector/Net, Part III: Install Sample Database
Programming, VB.NET February 23rd, 2009Install Sample Database
You can download example databases for MySQL at http://dev.mysql.com/doc (Scroll down to Example Databases section). By the time I’m writing the article, there are 4 sample databases available on the page. I choose the world database since it compatible with all MySQL version.
You can see index of this series at Accessing MySQL on VB.NET using MySQL Connector/Net, Part I: Introduction
Install Sample Database
- Download the sample database “world database”. Extract it, you’ll get the world.sql file to the Database PC. This file will be imported to MySQL in few steps later.

- On the database PC, open command-line mode. Type below command to connect to the MySQL Server using MySQL’s root account.
mysql -u root -p
The parameter -p makes MySQL ask you to enter the password. Then, type the root’s password. In this example, it is “password”.
Note: You can type this command on any path because I have added MySQL path to system environment while I was configuring MySQL Server on the previous part.

- Now I have connected to the MySQL Server. Next, I’m going to create an empty database name “world”.
CREATE DATABASE world;
Then, change the default database to the created database.
USE world;
- Next, load the contents of “world.sql” file into the world database. The “world.sql” file was created on the first step.
SOURCE c:world.sql
You have to alter the path to where the world.sql file is located.

- You’ll see lot of output that MySQL performs query from the world.sql file.

- After MySQL finishes processing the world.sql file, try to test if the query is executed successfully. Type the command below to list all tables on the current database.
SHOW TABLES;
- You also can see the columns on the table by type the below command.
DESCRIBE Country;
- If you see the columns and tables as previous steps, it means that you have install sample database successfully.
Reference
- Setting Up the world Database – MySQL.com.
Related post
- Accessing MySQL on VB.NET using MySQL Connector/Net, Part V: Install MySQL Connector Net Install MySQL Connector Net From last 4 parts, I have prepared MySQL Server with sample database. I’ve done on a...
- Accessing MySQL on VB.NET using MySQL Connector/Net, Part IV: Create & Grant MySQL User Account Create & Grant MySQL User Account By default, the root account on MySQL Server has all privileges on every tables...
- Accessing MySQL on VB.NET using MySQL Connector/Net, Part II: Setup MySQL Server Setup MySQL Server This section I’ll show how to setup MySQL Server on a database PC. You can see index...
- Accessing MySQL on VB.NET using MySQL Connector/Net, Part VII: Perform SQL Operations Perform SQL Operations From the previous part, I have successfully connect to world database on MySQL Server from VB.NET. Next,...
- Accessing MySQL on VB.NET using MySQL Connector/Net, Part I: Introduction Introduction Here comes again, tutorial about programming to access a database server. This tutorial shows you how to use Microsoft...
Related posts:






