重新启动与停止mysql服务
启动方式1:service mysql start
启动方式2:/etc/init.d/mysql start
停止方式1:service mysql stop
停止方式2:/etc/init.d/mysql shutdown
重新启动方式1:service mysql restart
重新启动方式2:/etc/init.d/mysql restart
改动配置文件 cd hive013/conf
cp hive-default.xml.template hive-site.xml
cp hive-env.sh.template hive-env.sh
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://DataNode2:3306/hive?=createDatabaseIfNotExist=true</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>hadoop</value>
<description>username to use against metastore database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>hadoop</value>
<description>password to use against metastore database</description>
</property>
###hive.metastore.warehouse.dir是用缺省位置,能够自行改动
<name>hive.metastore.uris</name>
<value>thrift://DataNode2:9083</value>
<description>Thrift uri for the remote metastore. Used by metastore client to connect to remote metastore.</description>
</property>
后台执行
前台退出ctrl+c
nohup bin/hive --service metastore > metastore.log 2>&1 &
后台退出
jobs
版权声明:本文博主原创文章。博客,未经同意不得转载。