On Ambari Server
1) Download the latest mysql-connector-java-xxxx.jar and copy into this server's /usr/share/java/
2) ln -sf /usr/share/java/mysql-connector-java-xxxx.jar /usr/share/java/mysql-connector-java.jar
3) ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar
4) find /var/lib/ambari-server/resources -name 'mysql-*.jar' -ls
Above is to make sure it's updated.
On HiveServer2/Metastore Server
1) find / -name 'mysql-*.jar' -ls
2) remove old mysql-connector-xxx.jar from Agent's tmp directory and /usr/hdb/<version>/hive/lib
3) remove old mysql-jdbc-driver.jar from Agent's cache directory
4) Replace /usr/hdp/<version>/hadoop/lib/mysql-connector-java.jar with newer version if exists.
5) Restart ambari-agent
6) Restart Hive (hiveserver2/metastore) from Ambari
7) Run find command to make sure the version is correct by checking the file size
0 件のコメント:
コメントを投稿