In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "configuring mysql metadata under Hive". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. First install mysql on ubuntu14.04, first try to download the tar package of mysql and install it unsuccessfully, then install sudo apt-get install mysql-server mysql-client online and install it successfully.
2. Log in to the database
A) create a hive user, create user hive identified by 'hive'
B) Grant all permissions grant all privileges on *. * to 'hive' with grant option
C) create a hive database, create database 'hive'
3. Download the driver for connecting mysql to java, and copy it to / opt/hive-1.1.1/lib
4. Modify the hive-default.xml in / opt/hive-1.1.1/conf to hive-site.xml.
a)
Javax.jdo.option.ConnectionURL
Jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true
JDBC connect string for a JDBC metastore
b)
Javax.jdo.option.ConnectionDriverName
Com.mysql.jdbc.Driver
Driver class name for a JDBC metastore
c)
Javax.jdo.option.ConnectionUserName
Hive
Username to use against metastore database
d)
Javax.jdo.option.ConnectionPassword
Hive
Password to use against metastore database
5. Start hadoop, then start hive
A) the following error occurred in startup
Solution:
B) error report
Solution:
Change the relative path in a to an absolute path.
6. When configuring the hive environment variable, modify the etc directory permission of linux to 777.After restarting the linux machine,
It was found that su, sudo and other commands could not be used, and hadoop failed to start.
7. Some problems were encountered during the re-cloning of the backup virtual machine, such as failure of login without password and failure of transfer to root user.
A) the solution of su:authentication failure under Ubuntu
I. $sudo passwd root
ii. Enter new UNIX password:
iii. Retype new UNIX password:
iv. Passwd: password updated successfully
B) reset login without a password.
After deleting / home/hadoop/.ssh, re-use ssh-keygen-t rsa-P "" to generate only two files.
Recreate the authorized_keys file, and touch authorized_keys; copies the public key in
Cat id_rsa.pub > > authorized_keys, you can log in without a password
C) copy from one server to another command:
Scp / home/hadoop/.ssh/id_rsa hadoop@192.168.93.37:/home/hadoop/.ssh/
D) an error occurred while creating "external table". The message is as shown below:
For information, create table... Stored by textfile has Bug in hive-1.1.1, at 1.0.0
1.0.1, 1.1.0, 1.2.0, no problem. Bug address: http://osdir.com/ml/general/2015-05/msg35094.html
E) create "Partition Table" and report an error as follows:
Syntax error: row format delimited should not be followed by'\ t'
This is the end of "configuring mysql metadata under Hive". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.