Before using Oozie with a new or existing MySQL database; obtain the appropriate
driver and .jar files, create a Oozie user with sufficient permissions, and create the Oozie
database.
Determine the appropriate database version and obtain the
release drivers and .jar file.
-
On the Ambari Server host, stage the appropriate MySQL connector for later
deployment.
-
On the Ambari Server host, Download the MySQL Connector/JDBC driver from
MySQL.
-
Run
ambari-server setup --jdbc-db=mysql
--jdbc-driver=/path/to/mysql/mysql-connector-java.jar
-
Confirm that mysql-connector-java.jar is in the Java
share directory.
ls /usr/share/java/mysql-connector-java.jar
-
Make sure the .jar file has the appropriate permissions - 644.
-
Execute the following command:
ambari-server setup --jdbc-db=mysql
--jdbc-driver=/usr/share/java/mysql-connector-java.jar
-
Create a user for Oozie and grant it permissions.
using the MySQL database admin utility:
# mysql -u root -p
CREATE USER '<OOZIEUSER>'@'%' IDENTIFIED BY '<OOZIEPASSWORD>';
GRANT ALL PRIVILEGES ON *.* TO '<OOZIEUSER>'@'%';
FLUSH PRIVILEGES;
Where [OOZIE_USER] is the Oozie user name and
[OOZIE_PASSWORD] is the Oozie user password.
-
Create the Oozie database.
The Oozie database must be created before loading the Oozie database
schema.
# mysql -u root -p
CREATE DATABASE [OOZIE_DATABASE]
Where [OOZIE_DATABASE] is the Oozie database name.