mysql双主搭建

2022-09-16 12:02:48 浏览数 (1)

之前summer部署过主从,这里记录下部署双主的方法,坑有蛮多但总体还算顺利。MySQL版本为8.0.19

# 前置条件

  • MySQL版本为8.0.19安装方法见mysql8安装
  • 这里准备两个节点A:200,B:201
代码语言:javascript复制
root in summer-200 in /usr/local/mysql took 34m44s 
➜ mysql -V
mysql  Ver 8.0.19 for linux-glibc2.12 on x86_64 (MySQL Community Server - GPL)
root in summer-200 in /usr/local/mysql 
➜ ip a | grep 200
    inet 192.168.163.200/16 brd 192.168.255.255 scope global ens192
代码语言:javascript复制
root in summer-201 in ~ 
➜ mysql -V
mysql  Ver 8.0.19 for linux-glibc2.12 on x86_64 (MySQL Community Server - GPL)
root in summer-201 in ~ 
➜ ip a | grep 201
    inet 192.168.163.201/16 brd 192.168.255.255 scope global ens192

# 双主配置

# 主机A(200)配置

代码语言:javascript复制
root in summer-200 in ~ via 


	

0 人点赞