Options
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Expert Contributor
Created on 01-03-2018 07:22 PM
Hive metastore DB Connection verification from Command line:-
You can run the following on any node where ambari agent installed on the cluster,
You need the following information to run this test.
You can use this to validate if the password stored in ambari and the actual mysql db password are same.
1. mysql db hostname
2. mysql db port number
3. mysql database name which hive metastore uses
4. mysql username
5. mysql password
Syntax:-
java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/share/java/mysql-connector-java.jar -Djava.library.path=/usr/lib/ambari-agent org.apache.ambari.server.DBConnectionVerification "jdbc:mysql://<mysql db hostname>:<mysql db port number>/<mysql database name>" "<mysql username>" "<mysql password>" com.mysql.jdbc.Driver
Example:-
/usr/jdk64/jdk1.8.0_112/bin/java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/share/java/mysql-connector-java.jar -Djava.library.path=/usr/lib/ambari-agent org.apache.ambari.server.DBConnectionVerification "jdbc:mysql://test.openstacklocal:50001/hive" hive hive com.mysql.jdbc.Driver
Connected to DB Successfully!
You can run the following on any node where ambari agent installed on the cluster,
You need the following information to run this test.
You can use this to validate if the password stored in ambari and the actual mysql db password are same.
1. mysql db hostname
2. mysql db port number
3. mysql database name which hive metastore uses
4. mysql username
5. mysql password
Syntax:-
java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/share/java/mysql-connector-java.jar -Djava.library.path=/usr/lib/ambari-agent org.apache.ambari.server.DBConnectionVerification "jdbc:mysql://<mysql db hostname>:<mysql db port number>/<mysql database name>" "<mysql username>" "<mysql password>" com.mysql.jdbc.Driver
Example:-
/usr/jdk64/jdk1.8.0_112/bin/java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/share/java/mysql-connector-java.jar -Djava.library.path=/usr/lib/ambari-agent org.apache.ambari.server.DBConnectionVerification "jdbc:mysql://test.openstacklocal:50001/hive" hive hive com.mysql.jdbc.Driver
Connected to DB Successfully!