Miguel Gonzalez
Miguel Gonzalez

Reputation: 446

When I use Hadoop, I get this error in Hive

can somebody help? thanks in advance

enter image description here


enter image description here


enter image description here

Upvotes: 1

Views: 199

Answers (2)

Miguel Gonzalez
Miguel Gonzalez

Reputation: 446

It worked fine in Ubuntu... I could not make it work in windows. But at least working now. Thanks.

Upvotes: 0

steven-matison
steven-matison

Reputation: 1659

@Miguel The error is suggesting an issue starting mysql. Please login to sandbox and execute the command to see what's going on. Additionally, you may need to manually install mysql mysql-server or mariadb mariadb-server depending on your version. This is a requirement. You will need to be sure that Hive is configured correctly for mysql, and uses a user and table that has been created for hive:

CREATE DATABASE hive;
CREATE USER 'hive'@'sandbox-hdp.hortonworks.com' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'sandbox-hdp.hortonworks.com' WITH GRANT OPTION;
FLUSH PRIVILEGES;

Also you need to make sure that Ambari-hive can see mysql:

To use MySQL with Hive, you must download the https://dev.mysql.com/downloads/connector/j/ from MySQL. Once downloaded to the Ambari Server host, run: ambari-server setup --jdbc-db=mysql --jdbc-driver=/path/to/mysql/com.mysql.jdbc.Driver

The commands for this in centos are:

yum install mysql-connector-java && ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar 

Upvotes: 3

Related Questions