4.安装mysql服务
依次输入指令: rpm -ivh mysql-community-common-5.7.29-1.el7.x86_64.rpm rpm -ivh mysql-community-libs-5.7.29-1.el7.x86_64.rpm rpm -ivh mysql-community-client-5.7.29-1.el7.x86_64.rpm rpm -ivh mysql-community-server-5.7.29-1.el7.x86_64.rpm --nodeps --force
将以下配置信息添加到/etc/my.cnf文件symbolic-links=0配置信息的下方。
default-storage-engine=innodb
innodb_file_per_table
collation-server=utf8_general_ci
init-connect='SET NAMES utf8'
character-set-server=utf8 5.启动mysql服务
输入命令:systemctl start mysqld
检察mysql服务是否启动/查询 MySQL 数据库状态 service mysqld status
mysqld 历程状态为 active (running),则表示 MySQL 数据库正常运行。
如果 mysqld 历程状态为 failed,则表示 MySQL 数据库启动异常。此时需要排查 /etc/my.cnf 文件。 [root@master software]# service mysqld status
Redirecting to /bin/systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since 二 2022-10-25 15:26:49 CST; 15s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 40033 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 39975 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
6.重置mysql密码
检察mysql安装时随机生成的密码。 输入指令:grep 'temporary password' /var/log/mysqld.log
大概:cat /var/log/mysqld.log | grep 'temporary password'
执行mysql_secure_installation命令初始化MySQL数据库
[root@master ~]# mysql_secure_installation
Securing the MySQL server deployment.
root@localhost: JYgT+Nl)C56=
先输入查到的暂时密码
输入新密码assword123$
# 再次输入新密码 Password123$
# 输入 y
# 输入 y
# 输入 n
# 输入 y
# 输入 y
# 添加 root 用户从本地和远程访问 MySQL 数据库表单的授权。
[root@master ~]# mysql -uroot -p
# 输入新设定的密码 Password123$
mysql> grant all privileges on *.* to root@'localhost'identified by 'Password123$'; # 添加 root 用户本地访问授权 mysql> grant all privileges on *.* to root@'%' identified by'Password123$'; # 添加 root 用户远程访问授权 mysql> flush privileges; # 刷新授权 mysql> select user,host from mysql.user where user='root'; # 查询 root 用户授权情况
mysql> exit; # 退出 MySQL 数据库 # DBPassword=Zabbix@2024
按照实验步骤设置对应的 7.解压hive
[root@master ~]# tar -zxvf /opt/software/apache-hive-2.0.0-bin.tar.gz -C /usr/local/src
2>/dev/null | grep hbase [root@master bin]# flume-ng version
Flume 1.7.0
Source code repository: https://git-wip-us.apache.org/repos/asf/flume.git
Revision: 511d868555dd4d16e6ce4fedc72c2d1454546707
Compiled by bessbd on Wed Oct 12 20:51:10 CEST 2016
From source with checksum 0d21b3ffdc55a07e1d08875872c00523
安装成功