Install MySQL as usual and start the service. During installation, you will be asked if you want to accept the results from the rpm file’s GPG verification. If no error or mismatch occurs, enter y.
Start the mysql Daemon
Ensure that daemon stays active even after reboot
Installing mySQL JDBC driver
Configure the External Database
Run the Script
Service
Database
User
Cloudera Manager Server
scm
scmuser
Activity Monitor
amon
amonuser
Reports Manager
rman
rmanuser
Hue
hue
hueuser
Hive Metastore Server
metastore
hiveuser
Oozie
oozie
oozieuser
Data Analytics Studio
das
dasuser
Ranger
ranger
rangeradmin
Set Password: password
Note: There is no current password for root in mysql so simply press Enter without entering password
CREATE DATABASE scm DEFAULT CHARACTER SET utf8;
GRANT ALL on scm.* TO 'scmuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE metastore DEFAULT CHARACTER SET utf8;
GRANT ALL on metastore.* TO 'hiveuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE amon DEFAULT CHARACTER SET utf8;
GRANT ALL on amon.* TO 'amonuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE rman DEFAULT CHARACTER SET utf8;
GRANT ALL on rman.* TO 'rmanuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE hue DEFAULT CHARACTER SET utf8;
GRANT ALL on hue.* TO 'hueuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE oozie DEFAULT CHARACTER SET utf8;
GRANT ALL on oozie.* TO 'oozieuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE das DEFAULT CHARACTER SET utf8;
GRANT ALL on das.* TO 'dasuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE ranger DEFAULT CHARACTER SET utf8;
GRANT ALL on ranger.* TO 'rangeradmin'@'%' IDENTIFIED BY 'password';
mysql -u root < mysql-setup.sql
sudo /usr/bin/mysql_secure_installation