Hive integration with mysql Hive integration with mysql hadoop hadoop

Hive integration with mysql


This is question is mostly related to your MySQL configuration.

I bet that the problem is in your jdbc URL configuration. The error says is trying to connect to host linux-96 and you mentioned you have installed your MySQL server in your localhost.

First run MySQL server in your localhost and try to open a client session:

$ sudo service mysqld start$ mysql -h localhost -u root -p

You should be able to login (if not search for how to reset MySQL root password)

Create your destination database in MySQL and a user and a password and check you can log in by command line before going ahead.

$ mysql -h localhost -u <user> -p<password> <database>

Then check you hive-site.xml configuration. You should have something like this:

<property>  <name>javax.jdo.option.ConnectionURL</name>  <value>jdbc:mysql://localhost:3306/database?createDatabaseIfNotExist=true</value></property><property>  <name>javax.jdo.option.ConnectionDriverName</name>  <value>com.mysql.jdbc.Driver</value></property><property>  <name>javax.jdo.option.ConnectionUserName</name>  <value>user</value></property><property>  <name>javax.jdo.option.ConnectionPassword</name>  <value>password</value></property>


Error strictly says, that you need to add necessary permissions to MySQL table.

Read more about MySQL permissions here: http://dev.mysql.com/doc/refman/5.5/en/grant.html
Here is useful tutorial: http://kb.mediatemple.net/questions/788/HOWTO%3A+GRANT+privileges+in+MySQL#dv


Your mysql password has changed. This is the only reason.

I have the same error, because my workmate changed mysql password without a word