Hive Default Database Modification configuration

Source: Internet
Author: User

This article is based on the previous post: Hive Environment Setup and testing

First, root User: upload the MySQL installation package (mysql-5.5.32.tar.gz) to the/install directory and unzip the installation;

ii.hadoop User: upload MySQL driver pack (Mysql-connector-java-3.0.17-ga-bin.jar) to/software/hive-1.2.2/lib

To modify the configuration file for hive:

Vi/software/hive-1.2.2/conf/hive-site.xml

To change the database connection mode:

394 <property>395 <name>javax.jdo.option.connectionurl</name>396 <!--<value>jdbc:derby :;d atabasename=metastore_db;create=true</value>-->397 <value>jdbc:mysql://  192.168.154.134:3306/hive?createdatabaseifnotexist=true&amp;characterencoding=utf8</value>  for a JDBC metastore</description>399 </property>

Change driver:

class  for a JDBC metastore</description>794 </property>

Change Login Name:

815 <property>816 <name>javax.jdo.option.connectionusername</name>817 <!--<value>APP </value>-->818 <value>root</value>819 <description>username to use against Metastore database</description>820 </property>

To change the login secret code:

379 <property>380 <name>javax.jdo.option.connectionpassword</name>381 <!--<value>mine </value>-->382 <value>123456</value>383 <description>password to use against Metastore database</description>384 </property>

The change log format is in binary format:

Vi/etc/my.cnf
mixed#binlog_format = Binlog_format=row

Third, test the installation is successful:

Root User under:

Cd/software/mysql-5.5.32/sbin

lsof-i:3306  // to see if the boot was successful

Cd/software/mysql-5.5.32/bin
//must be latin1; because Hive does not support Utf-8./mysql-uroot-p123456-e "Show databases;" // shows whether the database was created successfully

Hive Default Database Modification configuration

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.