Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 45.2Mb
PDF (A4) - 45.2Mb
PDF (RPM) - 40.9Mb
HTML Download (TGZ) - 10.6Mb
HTML Download (Zip) - 10.6Mb
HTML Download (RPM) - 9.2Mb
Man Pages (TGZ) - 207.8Kb
Man Pages (Zip) - 309.9Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb
Excerpts from this Manual

20.3.1 Import Database Sample

The world_x database sample contains one JSON collection and a set of three relational tables:

  • Collection

    • countryinfo: Information about countries in the world.

  • Tables

    • country: Minimal information about countries of the world.

    • city: Information about some of the cities in those countries.

    • countrylanguage: Languages spoken in each country.


To follow this quick-start guide you need a MySQL server with X Plugin installed, the default in 8.0, and MySQL Shell to use as the client. See Installing MySQL Shell. Start MySQL before you load the example world_x database for this guide.

Download and Import world_x Database

To prepare the world_x database sample, follow these steps:

  1. Download

  2. Extract the installation archive to a temporary location such as /tmp/. Unpacking the archive results in a single file named world_x.sql.

  3. Import the world_x.sql file to your database. You can either:

    • Start MySQL Shell in SQL mode and import the file by issuing:

      mysqlsh -u root --sql --file /tmp/world_x-db/world_x.sql
      Enter password: ****
    • Set MySQL Shell to SQL mode while it is running and source the schema file while MySQL Shell is running by issuing:

      \source /tmp/world_x-db/world_x.sql
      Switching to SQL mode... Commands end with ;
      \source /tmp/world_x-db/world_x.sql

    Replace /tmp/ with the path to the world_x.sql file on your system. Enter your password when prompted. A non-root account can be used as long as the account has privileges to create new databases.

Related Information

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.