9. [HDP-准备] 安装mysql hdp service
1. 下载mysql rpm 包
yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm�
mysql rpm 下载2. 安装mysql
yum install mysql-community-server
mysql 安装过程中 mysql 安装完成3. 启动 mysql
systemctl start mysqld.service
mysql 成功启动4. 获取mysql 生成的随机密码
grep 'A temporary password is generated for root@localhost' /var/log/mysqld.log |tail -1
获取mysql 生成的随机5. 配置mysql
/usr/bin/mysql_secure_installation,设置密码必须是字母数字和_ -, 否则Ambari密码验证过不去
配置mysql5. 输入 mysql -u root -p, 验证是否可以登录mysql
验证是否可以登录mysql6. create ambari 所需要的objects:
create database ambari;
use ambari;
source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql;
使用Ambari 提供的sql 文件创建所需要的对象7. 配置允许root 远程登录mysql
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '1QAZ2wsx3edc_';
flush privileges;
root配置8. 如果打算共享该数据库给hive, mysql下执行如下操作
create database hive;
CREATE USER 'hive'@'%' IDENTIFIED BY '1QAZ2wsx3edc_';
GRANT ALL PRIVILEGES ON hive.* TO 'hive'@'%' IDENTIFIED BY '1QAZ2wsx3edc_';