0

When I use hive with derby metastore, it works fine. I want to use mysql metastore so I followed this link {https://dzone.com/articles/how-configure-mysql-metastore}.

Now when I launch hive by typing "hive" command on terminal I get many errors i.e.

{Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient}

{Unable to open a test connection to the given database. JDBC url = jdbc:mysql://usr/lib/hive/apache-hive-1.2.1-bin/metastore_db? createDatabaseIfNotExist=true, username = hive_user}

{com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure}

Please suggest me something.

Lukasz Szozda
  • 162,964
  • 23
  • 234
  • 275
Kapil
  • 75
  • 9
  • The JDBC URL looks very wrong. It should be something like 'jdbc:mysql://localhost:3306/metastore', or with the hostname instead of localhost if mysql is on another host. Look in hive-site.xml and change the URL to the correct one. – Roberto Congiu Dec 20 '15 at 12:24
  • Thanks robert, I will try it once reach home :) – Kapil Dec 21 '15 at 09:03
  • Hi Robert, thanks for your help. It worked. Anyway after your suggestion, I got one more error like ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D but I resolved them by changing some properties values in hive-site.xml. The solution was present here {http://stackoverflow.com/questions/27099898/java-net-urisyntaxexception-when-starting-hive} – Kapil Dec 21 '15 at 18:02
  • I am trying to configure mysql with hive from a very very long time, Everytime I encounter errors I don't understand where I am going wrong ..... as you can see in this link https://gist.github.com/anonymous/bb86629116891e5b2d8c30b95aca9aee hive-site.xml configuration can be seen here in the link https://gist.github.com/anonymous/44f1c9fc214136a113067cf3b4b72794 – KJ_kaka Apr 09 '16 at 16:30

0 Answers0