<configuration> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://localhost:3306/metastore?useSSL=false</value> <description>metadata is stored in a MySQL server</description> </property> <property> <name>javax.jdo.option.ConnectionDriverName</name> <value>com.mysql.cj.jdbc.Driver</value> <description>MySQL JDBC driver class</description> </property> <property> <name>javax.jdo.option.ConnectionUserName</name> <value>root</value> <description>user name for connecting to mysql server</description> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <value>你的密码</value> <description>password for connecting to mysql server</description> </property> </configuration>
# 切换成mysql库 use mysql; # 查询用户信息 select User,Host,authentication_string from user; # 设置远程登录权限 grant all privileges on *.* to 'root'@'%' identified by 'xxxxxxxx' with grant option; # 刷新配置信息 flush privileges; # 退出 exit
➜ apache-hive-2.3.6-bin bin/hive Logging initialized using configuration in file:/usr/local/apache-hive-2.3.6-bin/conf/hive-log4j2.properties Async: true Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases. hive >