1 安装mysql
apt-get install mysql-server
2 修改 hive 的默认配置
2.1 修改 hive 运行环境(hive-env.sh.template)
HADOOP_HOME=/lib/hadoop
2.2 在conf目录下添加hive-site.xml文件,内容为:
hive.metastore.local
true
controls whether to connect to remove metastore server or open a new metastore server in Hive Client JVM
javax.jdo.option.ConnectionURL
jdbc:mysql://localhost:3306/metastore_db?createDatabaseIfNotExist=true
JDBC connect string for a JDBC metastore
javax.jdo.option.ConnectionDriverName
com.mysql.jdbc.Driver
Driver class name for a JDBC metastore
javax.jdo.option.ConnectionUserName
root
username to use against metastore database
javax.jdo.option.ConnectionPassword
password
password to use against metastore database