Hive的元資料庫替換為Mysql
阿新 • • 發佈:2018-11-11
1.驅動拷貝
拷貝mysqlconnectorjava5.1.27bin.jar到/root/hd/hive/lib/下
2.配置Metastore到MySql
-》在/root/hd/hive/conf目錄下建立一個hive-site.xml -》根據官方文件配置引數,拷貝資料到hive-site.xml檔案中(hive/conf/下建立檔案) <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://hd-01:3306/metastore?createDatabaseIfNotExist=t rue</value> <description>JDBC connect string for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionDriverName</name> <value>com.mysql.jdbc.Driver</value> <description>Driver class name for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionUserName</name> <value>root</value> <description>username to use against metastore database</descriptio n> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <value>root</value> <description>password to use against metastore database</descriptio n> </property> </configuration>