refer to:
http://www.cnblogs.com/linbingdong/p/5829369.html
But pay attention to database schema initialization, there are two ways.
First, configure hive-site.xml first
./schematool -initSchema -dbType mysql will automatically create databases and tables in db
Another, manually create the database, and source scripts (switch to the current path)
hive common problem solving dry goods Daquan
./schematool -initSchema -dbType derby