Hive uses MySQL as metadata

Source: Internet
Author: User

Add in Hive's Hive-site.xml


<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://10.20.109.213:3306/hive?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>hive</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>hiveMysqlAb1234567890</value>
</property>



Remember to assign the appropriate permissions to the MySQL hive user.

GRANT all privileges the hive.* to [e-mail protected] identified by "Hive";

GRANT all privileges the hive.* to [email protected]'% ' identified by ' hive ';

Then start Hive to

If you encounter error jline related, copy the JLine package under Hive/lib to Lib under the yarn path under Hadoop.

If hive starts with the following error:

Specified key was too long; Max key length is 767 bytes

Then modify the MySQL my.cnf in the character_set_client and Character_set_server, are set to Latin1, do not use Utf-8.


Hive uses MySQL as metadata

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.