Failed with exception MetaException(message:For direct MetaStore DB connections, we don't support re

在用hive装载文件的时候出现了以下错误:
hive> load data local inpath ‘/home/slaver/data/dataStruct.txt’ into table default.dept_partition partition(month=‘201709’);
Loading data to table default.dept_partition partition (month=201709)
Failed with exception MetaException(message:For direct MetaStore DB connections, we don’t support retries at the client level.)
FAILED: Execution Error, return code 1 from org.apache.had

网上的解决办法大部分都是mysql中存储hive元数据的数据库的编码问题,建议在尝试删元数据库之前(因为删库还要重新建)或者修改元数据库编码之后(因为这个没多大影响,又不丢数据),可以尝试修改下hive-site.xml配置文件(下面是我的,给予参考,划线部分根据自己的mysql需要与否自己配置)
Failed with exception MetaException(message:For direct MetaStore DB connections, we don't support re
然后到hive目录下执行以下命名:./bin/schematool -initSchema -dbType mysql
Failed with exception MetaException(message:For direct MetaStore DB connections, we don't support re
之后重新启动hive,再尝试进行装载就可以了