June 2017
Intermediate to advanced
536 pages
9h 49m
English
Before we move onto querying MySQL, let's go ahead and set up some sample data. MySQL provides a sample database called Sakila, which we can download from the official MySQL site, as follows:
cd ~wget http://downloads.mysql.com/docs/sakila-db.tar.gztar -xzf sakila-db.tar.gzcd sakila-db/
Once downloaded and unpacked, this should give us the following three files:

Moving forward, we need to see how we can import sakila-schema.sql and sakila-data.sql. Luckily, MySQL provides several ways to do this. A quick look at the sakila-schema.sql file shows the following entries at the top of the file:
DROP SCHEMA IF EXISTS sakila; ...