create database GuestBook; grant select,insert,update,delete,create,drop on GuestBook.* to guest@localhost.localdomain identified by ´password´;
2. create_tables.sql
use GuestBook; create table sys_gen( next_id int(8) not null, id char(10) not null);
insert into sys_gen (next_id, id) values (0, ´comment_id´);
create table comments( comment_id int(8) not null, email varchar(64), name varchar(32), comment varchar(128), cmt_date date default ´0000-00-00´ not null);
3. install.sh
#/bin/sh
mysql --user=root --host=localhost.localdomain --password=password < create_database.sql mysql --user=guest --host=localhost.localdomain --password=password < create_tables.sql