再次启动: [grid@h1 ~]$
hadoop-0.20.2/bin/start-all.sh [grid@h1 ~]$
hive-0.8.1/bin/hive hive> show
databases; 又报错2: FAILED:
Error in metadata: javax.jdo.JDOFatalDataStoreException:
null, message from server: "Host
'192.168.1.104' is not allowed to connect to this MySQL
server" NestedThrowables: java.sql.SQLException:
null, message from server: "Host
'192.168.1.104' is not allowed to connect to this MySQL
server" FAILED:
Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.DDLTask 问题解决2: 在mysql里运行:grant all on *.*
to hive@'192.168.1.104'identified
by 'hive' with grant option; 192.168.1.104是安装hive的机器ip 这个是因win7自带防火墙问题,连不上mysql
问题3 hive> show
tables; FAILED: Error
in metadata: MetaException(message:Got exception:
javax.jdo.JDODataStoreException An exception was thrown while
adding/validating class(es) : Can't create table
'.hivesd_params.frm' (errno: 139) java.sql.SQLException:
Can't create table '.hivesd_params.frm' (errno:
139) at
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946) at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985) at
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631) at
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723) 问题解决3:(是数据库编码引起的) drop
database hive; create
database hive character set
'latin1'; 建表 hive>
CREATE TABLE pokes (foo INT, bar
STRING); OK Time taken:
4.357 seconds 其他操作见:Hive常用的SQL命令操作.txt