先把hive-site.xml文件清空(5000行配置太坑了)
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hadoop</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>sa@123</value>
</property>
MYSQL的默认配置,MYSQL服务器就会将 127.0.0.1 转换为 localhost,TCP/IP 方式 和UNIX socket 方式的连接名称都是localhost。
mysql> create user 'hadoop'@'%' identified by 'sa@123';
mysql> grant all on *.* to 'hadoop'@localhost identified by 'sa@123';
mysql> flush privileges;
先要保证用hadoop用户可以正常登录mysql。
SOURCE /home/hadoop/app/apache-hive-2.3.4-bin/scripts/metastore/upgrade/mysql/hive-schema-2.1.0.mysql.sql;
可以启动hive了