hive 配置mysql元数据库
在 hive的配置文件hive-site.xml中
<?xml version="1.0"?>
<!--
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.
-->
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <!-- Hive Configuration can either be stored in this file or in the hadoop configuration files -->
<!-- that are implied by Hadoop setup variables. -->
<!-- Aside from Hadoop setup variables - this file is provided as a convenience so that Hive -->
<!-- users do not have to edit hadoop configuration files (that may be managed as a centralized -->
<!-- resource). --> <!-- Hive Execution Parameters -->
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://192.168.1.200: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>root</value>
<description>username to use against metastore database</description>
</property> <property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>123456</value>
<description>password to use against metastore database</description>
</property>
</configuration>
<name>javax.jdo.option.ConnectionUserName</name> 为mysql的授权的用户名
<name>javax.jdo.option.ConnectionPassword</name> 为mysql授权的密码 然后输入hive 命令
输入show databases ; 查看hive的数据库,默认为default
注意要把mysql-connector-java-xxx.jar 驱动放到hive的lib目录下
hive 配置mysql元数据库的更多相关文章
- HIVE配置mysql metastore
HIVE配置mysql metastore hive中除了保存真正的数据以外还要额外保存用来描述库.表.数据的数据,称为hive的元数据.这些元数据又存放在何处呢? 如果不修改配置hive ...
- hive上mysql元数据库配置
hive调试信息显示模式: ./hive -hiveconf hive.root.logger=DEBUG,console 非常有用. 默认情况下,Hive元数据保存在内嵌的 Derby 数据库中,只 ...
- hive 配置MySQL库
chkconfig mysqld on MySQL开机自启动 建库: --hive数据库2create database hive DEFAULT CHARSET utf8 COLLATE utf8_ ...
- Hive的mysql安装配置
一.MySQL的安装 Hive的数据,是存在HDFS里的.此外,hive有哪些数据库,每个数据库有哪些表,这样的信息称之为hive的元数据信息. 元数据信息不存在HDFS,而是存在关系型数据库里,hi ...
- Hive基本原理及配置Mysql作为Hive的默认数据库
Hive是什么? Hive是基于Hadoop之上的数据仓库: Hive是一种可以存储.查询.分析存储在hadoop中的大规模数据 Hive定义了简单的类SQL查询语言,成为HQL,它允许熟悉SQL的用 ...
- hive 的mysql配置
hive默认使用的是Derby数据库,Derby是一个嵌入式数据库,数据库一般创建在运行hive命令的目录,如果切换目录运行,则找不到数据库 hive mysql配置: 官网地址:https://cw ...
- ubuntu中为hive配置远程MYSQL database
一.安装mysql $ sudo apt-get install mysql-server 启动守护进程 $ sudo service mysql start 二.配置mysql服务与连接器 1.安装 ...
- HIVE使用mysql作为外置数据库配置详情
Hive安装配置(mysql) 安装mysql hadoop$:sudo apt-get update hadoop$:sudo apt-get install mysql-server 启动mysq ...
- Hive初步使用、安装MySQL 、Hive配置MetaStore、配置Hive日志《二》
一.Hive的简单使用 基本的命令和MySQL的命令差不多 首先在 /opt/datas 下创建数据 students.txt 1001 zhangsan 1002 lisi 1003 wangwu ...
随机推荐
- 1059: [ZJOI2007]矩阵游戏 - BZOJ
Description 小Q是一个非常聪明的孩子,除了国际象棋,他还很喜欢玩一个电脑益智游戏——矩阵游戏.矩阵游戏在一个N*N黑白方阵进行(如同国际象棋一般,只是颜色是随意的).每次可以对该矩阵进行两 ...
- tomcat集群时统计session与在线人数
tomcat集群时,原来通过HttpSessionListener实现类监听session的创建和销毁来统计在线人数的方法不再有效,因为不是每个人登陆都会在同一个tomcat服务器上,而在另一台tom ...
- ASP.NET MVC 数据分页思想及解决方案代码
作为一个程序猿,数据分页是每个人都会遇到的问题.解决方案更是琳琅满目,花样百出.但基本的思想都是差不多的. 下面给大家分享一个简单的分页器,让初学者了解一下最简单的分页思想,以及在ASP.NET MV ...
- XoftSpy 4.13的注册算法分析
[标题]XoftSpy 4.13的注册算法分析 [作者]forever[RCT] [语言]VC [工具]ida4.6,ollydbg1.1 [正文] 这个软件的算法很简单,正好拿来做逆向分 ...
- Nagios : Verifying Your Configuration
Every time you modify your configuration files, you should run a sanity check on them. It is importa ...
- SpringMVC ResponseBody返回中文乱码解决方案
@RequestMapping(value = "/getForm") @ResponseBody public List<String> getForm(String ...
- jquery.dataTables插件使用例子详解
DataTables是一个jQuery的表格插件.这是一个高度灵活的工具,依据的基础逐步增强,这将增加先进的互动控制,支持任何HTML表格 效果图 代码 <!doctype html> & ...
- 转:JavaScript中函数与对象的关系
来自:http://www.nowamagic.net/javascript/js_RelationOfFunctionAndObject.php 在ajax兴起以前,很多人写JavaScript可以 ...
- Move to Another Changelist
Move to Another Changelist 将选中的文件转移到其他的 Change list 中. Change list 是一个重要的概念,这里需要进行重点说明.很多时候,我们开发一个项目 ...
- R语言学习笔记:列表
R列表时以其他对象为成分的有序集合,列表的成分和向量不同,它们不一定是同一种数据类型,模式或者长度.例: > my.list<-list(stud.id=34453, + stud.nam ...