Mahmoud Sabeh-Allah
Mahmoud Sabeh-Allah

Reputation: 49

Hive integration with mysql

i already installed Hive with hadoop over Hbase, i changed the configuration of database driver from derby to MySQL, but i got this exception

 FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Access denied for user 'DBAUSER'@'linux-96' (using password: YES)

NestedThrowables:

 java.sql.SQLException: Access denied for user 'DBAUSER'@'linux-96' (using password: YES)
 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

i already installed MySQL on localhost and configured hive-site.xml to read from this db

i don't know where is the problem, could anyone help?

Upvotes: 2

Views: 4852

Answers (3)

飞机 刘
飞机 刘

Reputation: 1

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

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

Upvotes: 0

Diego Pino
Diego Pino

Reputation: 11586

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>

Upvotes: 1

wlk
wlk

Reputation: 5785

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

Upvotes: 0

Related Questions