HOME BOOKS PUBLICATIONS PRESENTATIONS

 

Installing the Example Database

Chapter 4 of SQL for MYSQL Developers describes how to install the example database. That description includes explanations of how certain SQL statements work. This page contains a more concise description of the installation procedure.

We assume that you have successfully installed MySQL and WinSQL. If you havealready created a user, such as BOOKSQL, then start with step 4.

Step 1: Start WinSQL and log on using the user name root with password root.

Step 2: Create a new user called BOOKSQL with password BOOKSQLPW. Type in the following SQL statement:

Execute this statement by pushing the button with the green arrow. If the user is created, the following window appears:

Step 3: Assign BOOKSQL all the required privileges with the following statement, and execute the statement:

Stop WinSQL now.

Step 4: Start WinSQL and log on with user name BOOKSQL and password BOOKSQLPW:

Step 5: Create a new database called TENNIS using the CREATE DATABASE statement. Don't forget the execute the statement:

Step 6: Make TENNIS the current database through the USE statement:

Step 7: Download the file SQLforMySQL_V1_create_new_database.txt. Open the file with, for example, Notepad. Copy all the statements from the file into WinSQL:

Execute all the statements by pushing the button with the green arrow. The example database will be ready after this.


Copyright (c) 2025 R20/Consultancy B.V.. All rights reserved.