blob: e1a1de0fbc6620edd146549b23cb56124cf067da [file] [log] [blame]
create database visitors;
use visitors;
# not necessary to create user if we grant (and not supported in some dialects)
# create user 'brooklyn' identified by 'br00k11n';
grant usage on *.* to 'brooklyn'@'%' identified by 'br00k11n';
# ''@localhost is sometimes set up, overriding brooklyn@'%', so do a second explicit grant
grant usage on *.* to 'brooklyn'@'localhost' identified by 'br00k11n';
grant all privileges on visitors.* to 'brooklyn'@'%';
flush privileges;
CREATE TABLE MESSAGES (
id BIGINT NOT NULL AUTO_INCREMENT,
NAME VARCHAR(30) NOT NULL,
MESSAGE VARCHAR(400) NOT NULL,
PRIMARY KEY (ID)
);
INSERT INTO MESSAGES values (default, 'Isaac Asimov', 'I grew up in Brooklyn' );