Hive metastore MYSQL配置
2014-10-21 10:42
393 查看
元数据mysql配置
1 安装mysql
rpm -qa | grep mysql
// 这个命令就会查看该操作系统上是否已经安装了mysql数据库
rpm -e --nodeps mysql
// 强力删除模式,如果使用上面命令删除时,提示有依赖的其它文件,则用该命令可以对其进行强力删除
yum list | grep mysql
//查看yum上提供的mysql数据库可下载的版本
yum install -y mysql-server mysql mysql-devel
//将mysql mysql-server mysql-devel都安装好
rpm -qi mysql-server //查看刚安装好的mysql-server的版本
//启动 mysql
service mysqld start
service mysqld restart
//设置mysql开机自启动
chkconfig --list | grep mysqld
chkconfig mysqld on
/usr/bin/mysqladmin -u root password 'root' // 为root设置密码
// 允许root用户远程访问
use mysql;
update user set host='%' where user='root';
flush privileges;
select host, user from user;
修改配置文件 $HIVE_HOME/conf/hive-site.xml
添加mysql的jar包到lib目录
$HIVE_HOME/conf/lib
2 创建用户给hive使用
CREATE USER 'hive'@'localhost' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'localhost' WITH GRANT OPTION;
1 安装mysql
rpm -qa | grep mysql
// 这个命令就会查看该操作系统上是否已经安装了mysql数据库
rpm -e --nodeps mysql
// 强力删除模式,如果使用上面命令删除时,提示有依赖的其它文件,则用该命令可以对其进行强力删除
yum list | grep mysql
//查看yum上提供的mysql数据库可下载的版本
yum install -y mysql-server mysql mysql-devel
//将mysql mysql-server mysql-devel都安装好
rpm -qi mysql-server //查看刚安装好的mysql-server的版本
//启动 mysql
service mysqld start
service mysqld restart
//设置mysql开机自启动
chkconfig --list | grep mysqld
chkconfig mysqld on
/usr/bin/mysqladmin -u root password 'root' // 为root设置密码
// 允许root用户远程访问
use mysql;
update user set host='%' where user='root';
flush privileges;
select host, user from user;
修改配置文件 $HIVE_HOME/conf/hive-site.xml
<span style="font-size:14px;"><?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>true</value> </property> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://localhost/hive?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>hive</value> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <value>hive</value> </property> </configuration></span>
添加mysql的jar包到lib目录
$HIVE_HOME/conf/lib
2 创建用户给hive使用
CREATE USER 'hive'@'localhost' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'localhost' WITH GRANT OPTION;
相关文章推荐
- 【hive】mysql metastore 配置
- hive使用mysql保存metastore
- How-to: Install hive with mysql metastore
- hive metastore ha 配置
- Hive使用MySQL保存Metastore
- 使用MYSQL作为HIVE的METASTORE
- 20131016hive配置问题hive.metastore.warehouse.dir
- Hive 之使用mysql作为hive的metastore
- [spark]spark/hive配置metastore为postgresql
- Hive Using Derby in Server Mode(用Derby配置Hive的metastore——服务器模式)
- 使用mysql存储存储hive的metastore
- Hive metastore三种配置方式
- hive0.13.1安装-mysql server作为hive的metastore
- hive 操作(二)——使用 mysql 作为 hive 的metastore
- Hive学习之Metastore及其配置管理
- Hive metastore三种配置方式
- Hive metastore三种配置方式
- hive+mysql安装、hive.metastore.local属性的真正用途
- Hive metastore三种配置方式
- hive使用mysql保存metastore