#!/bin/bash

if [[ $1 == *"Ubuntu"* ]]; then
    sudo apt-get install --force-yes -y mysql-client
elif [[ $1 == *"CentOS"* ]] || [[ $1 == *"Red Hat Enterprise Linux"* ]]; then
    sudo yum install -y mysql
elif [[ $1 == *"SUSE"* ]]; then
    sudo zypper install mysql-community-server-client
else
    echo "Unknown distribution"
    exit 1
fi

#!/bin/bash

if [[ $1 == *"Ubuntu"* ]]; then
    sudo apt-get install --force-yes -y mysql-client libmysql-java
elif [[ $1 == *"CentOS"* ]] || [[ $1 == *"Red Hat Enterprise Linux"* ]]; then
    sudo yum install -y mysql mysql-connector-java
elif [[ $1 == *"SUSE"* ]]; then
    sudo zypper install mysql-community-server-client mysql-connector-java
else
    echo "Unknown distribution"
    exit 1
fi

Install MySQL JDBC driver along with client
Install MySQL JDBC driver along with client

Oozie can't start properly because of absence of MySQL JDBC driver in
its lib/ directory. The jar is copied there from /usr/share/java/mysql-
connector-java.jar during Oozie install. Driver is provided by
libmysql-java on Ubuntu and mysql-connector-java on RedHat and SLES

Change-Id: I75d70eea82ec136f49770431a1d0a872717263e1
Closes-Bug: #1432633
