安装mysql-connector-java.jar
要在Hive中使用MySQL,您必须从MySQL 下载https://dev.mysql.com/downloads/connector/j/
一旦下载到Ambari服务器主机,运行:
ambari-server setup --jdbc-db=mysql --jdbc-driver=/path/to/mysql/mysql-connector-java.jar
下载mysql repo
wget http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
安装mysql repo
rpm -ivh mysql57-community-release-el7-9.noarch.rpm
执行完成后会在/etc/yum.repos.d/目录下生成两个repo文件
mysql-community.repo
mysql-community-source.repo
更新yum缓存
yum clean all
yum makecache
安装mysql-connector-java
# 安装mysql-connector-java
yum install mysql-connector-java
# 运行以下
ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar