mysql -u root -proot -- hive CREATE USER 'hive'@'localhost' IDENTIFIED BY 'bigdata'; GRANT ALL PRIVILEGES ON *.* TO 'hive'@'localhost'; CREATE USER 'hive'@'%' IDENTIFIED BY 'bigdata'; GRANT ALL PRIVILEGES ON *.* TO 'hive'@'%'; CREATE USER 'hive'@'hdp03.hadoop.com' IDENTIFIED BY 'bigdata'; GRANT ALL PRIVILEGES ON *.* TO 'hive'@'hdp03.hadoop.com'; CREATE DATABASE metastore;
-- ambari CREATE USER 'ambari'@'%' IDENTIFIED BY 'bigdata'; GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'%'; CREATE USER 'ambari'@'localhost' IDENTIFIED BY 'bigdata'; GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'localhost'; CREATE USER 'ambari'@'hdp01.hadoop.com' IDENTIFIED BY 'bigdata'; GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'hdp01.hadoop.com'; CREATE DATABASE ambari;
-- oozie CREATE DATABASE oozie; USE oozie; CREATE USER 'oozie'@'%' IDENTIFIED BY 'oozie'; GRANT ALL ON *.* TO 'oozie'@'%';
-- knox CREATE DATABASE knox; USE knox; CREATE USER 'knox'@'%' IDENTIFIED BY 'knox'; GRANT ALL ON *.* TO 'knox'@'%';
-- ranger CREATE USER 'rangerdba'@'localhost' IDENTIFIED BY 'rangerdba'; GRANT ALL PRIVILEGES ON *.* TO 'rangerdba'@'localhost'; CREATE USER 'rangerdba'@'%' IDENTIFIED BY 'rangerdba'; CREATE USER 'rangerdba'@'hdp02.hadoop.com' IDENTIFIED BY 'rangerdba'; GRANT ALL PRIVILEGES ON *.* TO 'rangerdba'@'hdp02.hadoop.com' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'rangerdba'@'localhost' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'rangerdba'@'%' WITH GRANT OPTION; create database ranger; CREATE USER 'rangerdba'@'hdp01.hadoop.com' IDENTIFIED BY 'rangerdba'; GRANT ALL PRIVILEGES ON *.* TO 'rangerdba'@'hdp01.hadoop.com' WITH GRANT OPTION;
-- Hue CREATE USER 'hue'@'%' IDENTIFIED BY 'hue'; GRANT ALL ON *.* TO 'hue'@'%'; CREATE USER 'hue'@'localhost' IDENTIFIED BY 'hue'; GRANT ALL PRIVILEGES on *.* to 'hue'@'localhost' WITH GRANT OPTION; GRANT ALL on hue.* to 'hue'@'localhost'; CREATE DATABASE hue;
--SAM create database registry; CREATE USER 'registry'@'%' IDENTIFIED BY 'registry'; GRANT ALL ON *.* TO 'registry'@'%'; create database streamline; CREATE USER 'streamline'@'%' IDENTIFIED BY 'streamline'; GRANT ALL ON *.* TO 'streamline'@'%';
--Druid CREATE DATABASE druid DEFAULT CHARACTER SET utf8; CREATE DATABASE superset DEFAULT CHARACTER SET utf8; CREATE USER 'druid'@'%' IDENTIFIED BY 'druid'; CREATE USER 'superset'@'%' IDENTIFIED BY 'superset'; GRANT ALL PRIVILEGES ON *.* TO 'druid'@'%' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'superset'@'%' WITH GRANT OPTION; CREATE USER 'druid'@'localhost' IDENTIFIED BY 'druid'; CREATE USER 'superset'@'localhost' IDENTIFIED BY 'superset'; GRANT ALL PRIVILEGES ON *.* TO 'druid'@'localhost' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'superset'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES; exit;
Config Ambari Repo
(On hdp01 server)
1 2 3 4
cd /etc/yum.repos.d/ wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.3.0/ambari.repo -O /etc/yum.repos.d/ambari.repo yum clean all yum makecache