O'Reilly logo

Sams Teach Yourself MySQL by Chris Newman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required