运维开发网

Hive安装报错

运维开发网 https://www.qedev.com 2020-03-17 19:49 出处:网络
感谢分享:http://m.blog.itpub.net/30089851/viewspace-2074761/ [root@sht-sgmhadoopnn-01 hive-2.0.0]# cd bin  [root@sht-sgmhadoopnn-01 bin]# hive  Logging initialized using configuration in jar:file:/hadoop/

感谢分享:http://m.blog.itpub.net/30089851/viewspace-2074761/

[root@sht-sgmhadoopnn-01 hive-2.0.0]# cd bin 

[root@sht-sgmhadoopnn-01 bin]# hive 
Logging initialized using configuration in jar:file:/hadoop/hive-2.0.0/lib/hive-common-2.0.0.jar!/hive-log4j2.properties 
Exception in thread "main" java.lang.RuntimeException: Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql) 


[root@sht-sgmhadoopnn-01 bin]# ll 
total 64 
-rwxr-xr-x 1 root root 1434 Feb 10 09:50 beeline 
-rwxr-xr-x 1 root root 2553 Dec  1 05:54 beeline.cmd 
drwxr-xr-x 3 root root 4096 Mar 29 23:19 ext 
-rwxr-xr-x 1 root root 8494 Feb 10 09:56 hive 
-rwxr-xr-x 1 root root 8713 Dec  1 05:54 hive.cmd 
-rwxr-xr-x 1 root root 1584 Apr 23  2015 hive-config.cmd 
-rwxr-xr-x 1 root root 1900 Apr 23  2015 hive-config.sh 
-rwxr-xr-x 1 root root  885 Apr 23  2015 hiveserver2 
-rwxr-xr-x 1 root root 1030 Jan 22 12:28 hplsql 
-rwxr-xr-x 1 root root 2278 Jan 22 12:28 hplsql.cmd 
-rwxr-xr-x 1 root root  832 Apr 23  2015 metatool 
-rwxr-xr-x 1 root root  884 Apr 23  2015 schematool 
You have mail in /var/spool/mail/root 

8.初始化 db 
[root@sht-sgmhadoopnn-01 bin]# schematool -initSchema -dbType mysql 
Metastore connection URL:        jdbc:mysql://localhost/hive?createDatabaseIfNotExist=true 
Metastore Connection Driver :    com.mysql.jdbc.Driver 
Metastore connection User:       hive 
Starting metastore schema initialization to 2.0.0 
Initialization script hive-schema-2.0.0.mysql.sql 
Initialization script completed 
schemaTool completed 
You have mail in /var/spool/mail/root 
[root@sht-sgmhadoopnn-01 bin]# 

0

精彩评论

暂无评论...
验证码 换一张
取 消