ubuntu20.04中安装mysql8.0步骤_023的小陈的博客-CSDN博客
安装完后:
首先登录mysql:
建立数据库hive
create database hive;
创建hive用户:
create user 'hive'@'%' IDENTIFIED WITH mysql_native_password BY '123456789';
授权:
GRANT ALL PRIVILEGES ON *.* TO hive@'%' WITH GRANT OPTION;
- #刷新权限
- flush privileges;
修改/etc/mysql/mysql.conf.d/mysqld.cnf
- bind-address = 0.0.0.0 #原127.0.0.1 修改为0.0.0.0
- mysqlx-bind-address = 127.0.0.1
重启mysql服务
sudo service mysql restart
下载地址Index of /hive
https://dlcdn.apache.org/hive/
sudo vim ~/.bashrc
添加
- export HIVE_HOME=/usr/local/hive#自己的安装路径
-
- export PATH=$PATH:${HIVE_HOME}/bin:${HIVE_HOME}/lib:
接着
source ~/.bashrc
- "1.0" encoding="UTF-8" standalone="no"?>
- type="text/xsl" href="configuration.xsl"?>
-
-
-
javax.jdo.option.ConnectionURL -
jdbc:mysql://hadoop200:3306/hive?createDatabaseIfNotExist=true&useSSL=false&allowPublicKeyRetrieval=true -
JDBC connect string for a JDBC metastore -
-
-
javax.jdo.option.ConnectionDriverName -
com.mysql.cj.jdbc.Driver -
Driver class name for a JDBC metastore -
-
-
javax.jdo.option.ConnectionUserName -
hive -
username to use against metastore database -
-
-
-
javax.jdo.option.ConnectionPassword -
123456789 -
password to use against metastore database -
-
-
datanucleus.autoCreateTables -
True -
-
-
hive.metastore.schema.verification -
false -
-
-
-
hive.metastore.event.db.notification.api.auth -
false -
-
-
-
hive.metastore.warehouse.dir -
/user/hive/warehouse -
- export HADOOP_HOME=/usr/local/hadoop #你自己的hadoop路径
- export HIVE_CONF_DIR=/usr/local/hive/conf #你自己的hive路径
下载地址:MySQL :: Download Connector/J

- schematool -dbType mysql -initSchema
- schematool -dbType mysql -info
- hive
启动hive:

创建表看能否成功:
create table test1(id int, name string);
显示数据库:
show databases;
