<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/user/hive/warehouse</value>
</property>
<property>
<name>hive.metastore.local</name>
<value>false</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://{mysql安装的ip}:3306/hive_remote?createDatabaseIfNotExist=true</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>11451287</value>
</property>
</configuration>
And then start the entire cluster hadoop zookeeper (due blogger zookeeper with jdk versions have differences, so there is no process of zookeeper)
Finally start hive, and bloggers continue error, climbed the pit a few days, whether it is for the jdbc driver version, or reinstall mysql, or reinstall the hive, he has refused all connected. Then pit the two days off, burst of inspiration, found a real machine to mysql even pc virtual machine connection is a failure, even though I turned off the virtual firewall. Then found that we needed to set up such a command in mysql the following, we end real machine can be accessed
mysql> GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
This time on the virtual machine with good hive MySQL map (found successful launch)
Therefore, the conclusion is: play had previously been playing in the single database above, even with the installation of the host database host above all normal, but when we play in the server above, not only to pay attention to the problem of strong fire switch, mysql database itself also needs we are authorized to connect to the MySQL server from any host