hive本地mysql
来源:互联网 发布:js 运行时未定义变量 编辑:程序博客网 时间:2024/05/29 17:43
一、安装mysql数据库
1.安装mysql
使用命令:yum install mysql mysql-server
2.设置mysql为开机启动
使用命令:chkconfig -add mysqld 添加mysql服务
使用命令:chkconfig msyqld on
3.启动mysql
service mysqld restart
4.修改本地mysql用户密码
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost'IDENTIFIED BY '123';
注意:是localhost而不是127.0.0.1就可以的,hive是本地启动模式默认会使用msyql数据库的user表中host为localhost的root用户登录mysql数据库。
5.刷新用户权限
flush privileges;
6.最好重启mysql服务
service mysqld restart
二、安装配置hive
1.解压hive的tar包
tar -xzvf apache-hive-1.2.1-bin.tar.gz
2.配置hive
在hive的conf目录下默认是没有hive-site.xml,将hive-default.xml 复制一个出来
cp hive-default.xml hive-site.xml
配置hive-site.xml文件内容如下:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You 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.--><configuration><property> <name>hive.metastore.warehouse.dir</name> <value>/user/hive_remote/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_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>123</value></property></configuration>
3.启动hive
在hive的目录下使用如下命令启动
./bin/hive
0 0
- hive本地mysql
- hive元数据配置本地mysql出错
- hive绑定本地mysql为元数据库
- Hive 本地环境搭建(mysql)
- Hive安装—本地MySQL模式
- Hive 2、Hive 的安装配置(本地MySql模式)
- Hive 运行三种方式之 本地mysql
- hive使用本地模式
- hive (本地模式)
- hive 使用本地模式
- Hive本地模式安装
- hive本地安装
- hive 开启本地模式
- hive中的本地模式
- Hive安装本地模式
- Hive本地模式
- spark本地调试hive
- Hadoop之Hive本地与远程mysql数据库管理模式安装手册
- 25分钟掌握Hive基本操作
- grub命令解析
- Android 百度地图开发(一)--- 申请API Key和在项目中显示百度地图
- 预留端口避免占用ip_local_reserved_ports
- Javascript基础1
- hive本地mysql
- Android百度地图开发(一)之初体验
- SAPUI5 学习笔记(1)
- [Java学习日志]图形界面开发练习——绘图板的实现
- Java生成xml——DOM4J生成
- Android上面的百度地图使用步骤
- openjudge 分糖果
- 行走在路上
- 142. Linked List Cycle I&II