Community Articles

Find and share helpful community-sourced technical articles.
Celebrating as our community reaches 100,000 members! Thank you!
Labels (1)


1) You must have an MySQL Server database instance running to be used by Ranger.

2) Execute the following command on the Ambari Server host. Replace database-type with mysql|oracle|postgres|mssql|sqlanywhere and /jdbc/driver/path based on the location of corresponding JDBC driver:

ambari-server setup --jdbc-db={database-type} --jdbc-driver={/jdbc/driver/path}

3) make sure root user have access to the db from ranger host and ranger kms host.

eg: your ranger host is & ranger kms host is then you should run following command on the mysql database:

GRANT ALL ON *.* TO 'root'@'' IDENTIFIED BY '<root_password>' WITH GRANT OPTION; GRANT ALL ON *.* TO 'root'@'' IDENTIFIED BY '<root_password>' WITH GRANT OPTION; flush privileges;


1) go to the ambari and go to the add service wizard

2) select the ranger and ranger kms host

3) make sure you fill following properties carefully in Ranger & Ranger KMS both:

DB_FLAVOR = mysql     
Ranger DB host = <db_host> eg:     
Setup Database and Database User = yes     
Database Administrator (DBA) username = root     
Database Administrator (DBA) password = <root_password> 


4) any name can be configured to following db or user properties as they will be created by root user as fresh database or user since we selected "Setup Database and Database User" to yes

Ranger DB name = ranger
Ranger DB username = rangeradmin     
Ranger DB password = rangeradmin 


5) Ranger KMS has an additional property:

KMS master key password: <kms_password> , this is also newly configured password of your choice.


6)) audit can configured based on your choice if you want audit for service operations,


Note: I have not given details of all the properties in this article because these are the important properties where people make mistakes.