MGR组复制环境部署 (多写模式)

MGR组复制环境部署 (多写模式)

一、环境准备

192.168.145.134 MGR-node1 (master1)
192.168.145.135 MGR-node2 (master2)
192.168.145.136 MGR-node3 (master3)
192.168.145.137 ProxySQL-node
查看系统版本信息
[root@MGR-node1 ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
为了方便实验,关闭所有节点的防火墙
[root@MGR-node1 ~]# systemctl stop firewalld
[root@MGR-node1 ~]# firewall-cmd --state
not running   
[root@MGR-node1 ~]# cat /etc/sysconfig/selinux |grep "SELINUX=disabled"
SELINUX=disabled
[root@MGR-node1 ~]# setenforce 0           
setenforce: SELinux is disabled
[root@MGR-node1 ~]# getenforce             
Disabled
[root@MGR-node1 ~]# scp /etc/hosts 192.168.145.135:/etc/
[root@MGR-node1 ~]# scp /etc/hosts 192.168.145.136:/etc/

二、在三个节点上安装Mysql5.7

安装mysql
[root@MGR-node1 ~]# yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
[root@MGR-node1 ~]# yum install -y mysql-community-server
启动MySQL服务器和MySQL的自动启动
[root@MGR-node1 ~]# systemctl start mysqld.service
[root@MGR-node1 ~]# systemctl enable mysqld.service
修改mysql的登陆密码
[root@MGR-node1 ~]# cat /var/log/mysqld.log|grep 'A temporary password'
2020-07-18T09:02:57.600363Z 1 [Note]A temporary password is generated for  root@localhost: eabae!YIr5Gg                    
登录mysql并设置密码安全策略              
[root@MGR-node1 ~]# mysql -peabae!YIr5Gg
mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)
    
mysql> set global validate_password_length=1;
Query OK, 0 rows affected (0.00 sec)
    
mysql> set password=password("123.com");
Query OK, 0 rows affected, 1 warning (0.00 sec)
    
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
查看mysql版本
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.7.31    |
+-----------+
1 row in set (0.00 sec)
查看uuid
mysql>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值