To set up MySQL for use with Oozie:
On the Ambari Server host, stage the appropriate MySQL connector for later deployment.
Install the connector.
RHEL/CentOS/Oracle Linux
yum install mysql-connector-java*
SLES
zypper install mysql-connector-java*
UBUNTU
apt-get install mysql-connector-java*
DEBIAN
apt-get install mysql-connector-java*
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 <OOZIEUSER> is the Oozie user name and <OOZIEPASSWORD> is the Oozie user password.
Create the Oozie database.
The Oozie database must be created prior.
# mysql -u root -p
CREATE DATABASE
<OOZIEDATABASE>Where <OOZIEDATABASE> is the Oozie database name.