As part of this quick-start guide, an example schema is provided
which is referred to as the world_x
schema.
Many of the examples demonstrate Document Store functionality
using this schema. Start your MySQL server so that you can load
the world_x
schema, then follow these steps:
Download world_x-db.zip.
Extract the installation archive to a temporary location such as
/tmp/
. Unpacking the archive results in a single file namedworld_x.sql
.Import the
world_x.sql
file to your server. 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 by issuing:
\sql Switching to SQL mode... Commands end with ; \source /tmp/world_x-db/world_x.sql
Replace
/tmp/
with the path to theworld_x.sql
file on your system. Enter your password if prompted. A non-root account can be used as long as the account has privileges to create new schemas.
The world_x
example schema contains the
following JSON collection and 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.
MySQL Shell Sessions explains session types.