1.环境说明
| 操作系统 | MySQL版本 | 角色 | IP 地址 | Server ID |
|---|---|---|---|---|
| Rocky Linux 10.0 | 8.4.6 | 主库(Master) | 192.168.100.5 | 1 |
| Rocky Linux 10.0 | 8.4.6 | 从库(Slave) | 192.168.100.6 | 2 |
2.修改主机名
2个节点均需要执行
# Master节点执行
hostnamectl set-hostname MySQL-Master
# Slave节点执行
hostnamectl set-hostname MySQL-Slave
3.关闭防火墙
2个节点均需要执行
systemctl stop firewalld
systemctl disable firewalld
systemctl status firewalld
3.关闭SELINUX
2个节点均需要执行
setenforce 0
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
4.安装依赖
2个节点均需要执行
dnf install -y wget glibc libaio numactl libaio-devel

最低0.47元/天 解锁文章
3828

被折叠的 条评论
为什么被折叠?



