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