mysql -uroot -p
create database hiveDB DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
create user 'bee' identified by '123456';
grant all privileges on hiveDB.* to 'bee'@'%' identified by '123456';
flush privileges;
<xml version="1.0" encoding="UTF-8">
<xml-stylesheet type="text/xsl" href="configuration.xsl">
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. See accompanying LICENSE file.
-->
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>hive.exec.scratchdir</name>
<value>/tmp/hive</value>
</property>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>hdfs://master:9000/hive/warehouse</value>
<description>location to default database for the warehouse</description>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hiveDBcreateDatabaseIfNotExist=true&characterEncoding=UTF-8&useSSL=false</value>
<description>Hive access metastore using JDBC connectionURL</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>bee</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>123456</value>
<description>password to access metastore database</description>
</property>
<property>
<name>javax.jdo.option.Multithreaded</name>
<value>true</value>
</property>
<!-- 分割 -->
<property>
<name>hive.metasotre.schema.verification</name>
<value>true</value>
</property>
</configuration>