HP OSMS Blueprint: Database Server on HP ProLiant Servers with MySQL and SLES10
Figure 3 Checking Extended Status Values
Creating the Sample Database for MySQL
To perform the tests in this blueprint, you need a sample database that uses multiple storage
engines and is already populated with sample data. Use the following procedure to create the
sample database:
1. Using your favorite text editor, create the following SQL script to generate the sample
database:
drop database if exists osmsdb;
create database osmsdb ;
use osmsdb ;
create table customer
(
customerID int(10) auto_increment not null primary key,
name char(20),
purchased datetime not null,
product varchar(30),
productID int,
INDEX (customerID)
)
TYPE = InnoDB;
create table employee
(
id int(5) auto_increment not null primary key,
depno int(5),
name varchar(20) not null,
cardnumber bigint(15) not null
);
insert into customer(name,purchased,product,productID) \
values( 'Jenny','2006-07-07 13:00:33','HP Laptop nc6220',5001), \
('Kate','2006-07-09 09:38:12', 'HP LaserJet 5M',9076);
insert into employee(depno,name,cardnumber) values( 10,'Mike',100081),\
(10,'Tom',100082),(10,'Jack',100083), (20,'Mary',100084),(20,'Cherry',100085),\
(20,'Jones',100086);
select * from customer ;
select * from employee ;
grant all on osmsdb.* to osmsusr@'localhost' identified by 'osmspass';
grant all on osmsdb.* to osmsusr@'%' identified by 'osmspass';
grant select on osmsdb.* to osmsusr2@'localhost' identified by 'osmspass2' ;
grant select on osmsdb.* to osmsusr2@'%' identified by 'osmspass2' ;
flush privileges;
2. Save the script as osmsample.sql.
14