Last active
August 8, 2017 19:51
-
-
Save simonellistonball/63ce7cc36681c2a7a828f10c43b99261 to your computer and use it in GitHub Desktop.
Quick Metron DB setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE IF NOT EXISTS metron; | |
GRANT ALL PRIVILEGES ON metron.* TO 'metron'@'sball-metron-0.field.hortonworks.com' identified by 'metron'; | |
use metron; | |
create table if not exists users( | |
username varchar(50) not null primary key, | |
password varchar(50) not null, | |
enabled boolean not null | |
); | |
create table authorities ( | |
username varchar(50) not null, | |
authority varchar(50) not null, | |
constraint fk_authorities_users foreign key(username) references | |
users(username) | |
); | |
create unique index ix_auth_username on authorities (username,authority); | |
insert into users (username, password, enabled) values ('admin', 'admin',1); | |
insert into authorities (username, authority) values ('admin', 'ROLE_USER'); | |
CREATE DATABASE IF NOT EXISTS druid; | |
CREATE DATABASE IF NOT EXISTS superset; | |
ALTER DATABASE druid CHARACTER SET utf8 COLLATE utf8_general_ci; | |
ALTER DATABASE superset CHARACTER SET utf8 COLLATE utf8_general_ci; | |
GRANT ALL PRIVILEGES ON druid.* TO 'druid'@'%' identified by 'druid'; | |
GRANT ALL PRIVILEGES ON superset.* TO 'superset'@'%' identified by 'druid'; | |
FLUSH PRIVILEGES; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment