MHA环境搭建
01 | 基础环境准备
brew cask install docker
docker pull ansible/centos7-ansible
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ansible/centos7-ansible latest 688353a31fde 3 years ago 447MB
docker run -itd --privileged --name centos-mysql 688353a31fde /usr/sbin/init
docker exec -it centos-mysql /bin/bash
yum install wget
yum install net-tools
yum install initscripts
yum install openssh-server
02 | 安装mysql
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server
systemctl start mysqld.service
cat /var/log/mysqld.log |grep 'temporary password'
mysql -u root -p
set password=password('new_password')
docker stop mysql
docker commit mysql centos:mysql-57
03 | 创建Master
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
cenos