hive安装后启动后保存
hive> show tables;
FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
NestedThrowables:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
经过检查是hive-site.xml
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://hadoop01:3306/hive?createDatabaseIfNotExist=true</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
主机名配置错误!更改后成功启动