Setup MySQL world Database [ 2024 ]
Setup MySQL world Database
This tutorial is a step-by-step guide to setting up the MySQL world Database and the tables in the schema. The world sample database is an example database from the MySQL team.
Download world Database
Download the MySQL script file that contains the SQL statements. To download the database, navigate to the following URL:
In the Example Databases section, click on world database download link. The download is available in two formats.
On the Windows Operating system, click on the Zip download link.
On Linux distributions, click on the TGZ download link.
Extract Contents
Extract the contents of the world-db zip file. Copy the world.sql file to a suitable location.
Connect to the MySQL server using the mysql command-line client:
$> mysql -u root -p
Enter the root password. We can also use a non-root user account. The user account should have privileges to create a new database. To know more about the MySQL command line client:
Install world Database
Execute the world.sql SQL script file to create the database structure and insert the data.
In this example, the world.sql file is located at the following location:
C:/TestingDocs/world.sql
Issue the following command at the MySQL command prompt.
mysql> SOURCE C:/TestingDocs/world.sql;
Press the Enter button to execute the command.
The database and the tables would be installed. To confirm, we can use the following command to know the tables:
mysql> SHOW TABLES;
MySQL world tables
Video Tutorial
MySQL Tutorials
MySQL Tutorials on this website:
For more information on MySQL Database: