标签:schema tar zxvf conf dal lse apach $path code server
在安装Hive时,一定要在该机器上添加了hadoop服务。
tar zxvf apache-hive-3.1.1-bin.tar.gz
mv apache-hive-3.1.1 /opt/
#hive
export HIVE_HOME=/opt/apache-hive-3.1.1
export PATH=$PATH:$HIVE_HOME/bin
hive --version
HADOOP_HOME = /opt/hadoop-3.1.1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<!--mysql连接-->
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://192.168.2.205:3306/hive?serverTimezone=GMT%2B8&useSSL=false</value>
</property>
<!--mysql驱动,这里是mysql8驱动连接方式-->
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.cj.jdbc.Driver</value>
</property>
<!--账户-->
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<!--密码-->
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>123456</value>
</property>
<property>
<name>hive.metastore.schema.verification</name>
<value>false</value>
</property>
</configuration>
将mysql驱动jar包,放在$HIVE_HOME/lib目录下
在mysql中创建hive数据库
chematool -dbType mysql -initSchema
标签:schema tar zxvf conf dal lse apach $path code server
原文地址:https://www.cnblogs.com/skyice/p/10447914.html