今天因为mysql服务不知道怎么崩了重新下载mysql和配置hive,然后发现更换mysql作为hive元数据库时一直报错
执行 schematool -dbType mysql -initSchema 进行数据库初始化也报错
Metastore connection URL: jdbc:mysql://finnchan:3306/metastore?createDatabaseIfNotExist=true&useSSL=false&serverTimezone=GMT
Metastore Connection Driver : com.mysql.jdbc.Driver
Metastore connection User: root
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
*** schemaTool failed ***
找了好久原因才发现是hive/lib里的驱动版本太低了,和mysql版本不匹配,换成mysql-connector-java-8.0.18.jar 就ok了