①yum install mariadb-server mariadb

    systemctl start mariadb   #启动MariaDB

    systemctl stop mariadb   #停止MariaDB

    systemctl restart mariadb   #重启MariaDB

    systemctl enable mariadb   #设置开机启动

②进入:mysql -u root -p

  1、use mysql -uroot; //不输入密码
  2、use mysql
  3、update user set password=PASSWORD('root') where user='root'; //设置root的密码
  4、update user set host='%' where host='127.0.0.1'; //允许其他人用root登录
  5、flush privileges;

③更改配置文件hive-site.xml

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
     <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
     <configuration>   

         <property>
             <name>hive.metastore.warehouse.dir</name>
             <value>/user/hive/warehouse</value>
             <description>location of default database for the warehouse</description>
         </property>  

         <property>
             <name>hive.cli.print.current.db</name>
             <value>true</value>
             <description>Whether to include the current database in the Hive prompt.</description>
         </property>  

         <property>
             <name>hive.cli.print.header</name>
             <value>true</value>
             <description>Whether to print the names of the columns in query output.</description>
         </property>
         <property>
             <name>javax.jdo.option.ConnectionURL</name>
             <value>jdbc:mysql://192.168.40.10:3306/metastore?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>root</value>
          </property>

      </configuration>        

④启动hive之后,再进入mysql -uroot -proot ,如能出现metastore数据库,则表示成功

最新文章

  1. 配置ntp服务
  2. 数据结构算法C语言实现(十四)--- 4.1&amp;4.2串的类型定义、表示及实现
  3. 【python】类中__slots__使用
  4. 编写高质量代码--改善python程序的建议(八)
  5. C#的控制台程序输出
  6. 转载网易博客:整理各大网站让网站变灰的css代码
  7. Python - python不是内部或外部命令
  8. 【PYTHON】二维码生成
  9. Java [leetcode 29]Divide Two Integers
  10. Aix项目_shell_rsh_01
  11. 对163k地方门户网站系统QQ互联功能修改
  12. VS2010/MFC对话框:非模态对话框的创建及显示
  13. Android中系统设置中的清除数据究竟会清除哪些数据
  14. UIView animateWithDuration 使用详解
  15. 关于PHP单双引号解析变量的问题
  16. 5 个免费的受欢迎的 SQLite 管理工具【申明:来源于网络】
  17. html 基本指令
  18. java输入最大10位数,倒数输出(很鸡肋)
  19. luogu2827 [NOIp2016]蚯蚓 (模拟)
  20. 这些JavaScript编程黑科技

热门文章

  1. Python _Mix*9
  2. chrome扩展应用API
  3. 2.5 定义FTP工具的各种方法
  4. 北大poj- 1032
  5. 神州数码OSPF路由汇总配置
  6. redis 分布式锁实现
  7. Idea Tomcat Servlet路径配置问题
  8. Mac + PyCharm 安装 Opencv3 + python2.7
  9. Python搭建环境
  10. How to Install Tomcat 8.0.27 on CentOS/RHEL and Ubuntu【转】