Creating the Sample Tables

Before moving on to the next lesson, you need to create the sample database tables that are used in this book.

Installing the Sample Tables

You can download a SQL file that contains all the instructions needed to create the sample tables from www.samspublishing.com.

Save this file to your hard disk as sampdb.sql and issue the following command:

$ mysql - -user=yourname - -password dbname < sampdb.sql

The < symbol causes the contents of sampdb.sql to be passed to the mysql program all at once. The result is that the sample tables are created within the database you specified.

Get Sams Teach Yourself MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.