Creating the Database

The KBI database has to be created (see Listing 11.1). It keeps its own user-login permissions, as well as the data for Reports 2 and 3. (Reports 1 and 4 will use existing data from the WCA application’s commish database.)

First, create the database by launching mysql and issuing the following command at the mysql> prompt:

create database kbi; 
Listing 11.1. Creating the KBI Database
use kbi; 

/* The first thing to do is to create the table of authorized users.
						* This table is just the user name; no password is required
						* for the KBI application.
						*
						* usage:
						*
						* % mysql -t < listing.11.1 
 */ drop table if exists tbl_authorized_users; create table tbl_authorized_users ( user_name varchar(20) ); insert into tbl_authorized_users ...

Get MySQL Building User Interfaces 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.