Advanced Cluster Options
Also available as:
PDF

Install mysql connector recipe

This recipe can be used to manually install and register the ‘mysql-connector-java.jar’.

Starting from Ambari version 2.6, if you have ‘MYSQL_SERVER’ component in your blueprint, you have to manually install and register the ‘mysql-connector-java.jar’. If you would like to automate this process in Cloudbreak:

  • Review the recipe content to ensure that the version of the connector provided in the recipe is as desired; if it is not adjust the version.
  • Apply the recipe as “pre-ambari-start”.

The recipe content is:

#!/bin/bash

download_mysql_jdbc_driver() {
  wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.39.tar.gz -P /tmp
  tar xzf /tmp/mysql-connector-java-5.1.39.tar.gz -C /tmp/
  cp /tmp/mysql-connector-java-5.1.39/mysql-connector-java-5.1.39-bin.jar /opt/jdbc-drivers/mysql-connector-java.jar
}

main() {
  download_mysql_jdbc_driver
}

main