搭建mysql-mmm高可用MySQL集群
实验需求:配置mysql-mmm,实现mysql的高可用 MySQL-MMM实现MySQL高可用 http://www.linuxidc.com/Linux/2014-02/96994.htm MySQ
实验需求:配置mysql-mmm,实现mysql的高可用
MySQL-MMM实现MySQL高可用
MySQL-MMM切换演示
mysql proxy、MySQL-MMM实现读写分离高可用性
将MySQL-MMM Master从REPLICATION_FAIL状态恢复
CentOS下利用MySQL-MMM实现MySQL高可用
实验方案:
一.公共配置
准备5台RHEL6.4操作系统的服务器,安装MySQL数据库服务器软件包。
其中2台数据库服务器(192.168.10.10,192.168.10.20),,配置为mysql主从同步中的主主结构,并开启级联复制功能。
把另外2台(192.168.10.30,192.168.10.40)配置为主主结构中,任意一台主的从数据库服务器。
验证数据是否能够正常同步
1.主数据库服务器192.168.10.10的配置文件如下:
vim /etc/my.cnf
[mysqld]
server_id=10
log_bin=mysql-10-bin //两台主数据库服务器必须开启binlog日志,名称设置不同
log_slave_updates=1 //允许级联复制
auto_increment_offset=1 //指定自动增长字段的起始值
auto_increment_increment=2 //指定自动增长字段的步长
skip-name-resolve //不解析主机名
2.主数据库服务器192.168.10.20的配置文件如下:
vim /etc/my.cnf
[mysqld]
server_id=20
log_bin=mysql-20-bin
log_slave_updates=1
auto_increment_offset=2 //起始值与另一台主不同,防止字段重复,无法写入
auto_increment_increment=2
skip-name-resolve
3.配置从数据库服务器192.168.10.30
vim /etc/my.cnf
[mysqld]
server_id=30
log_bin=mysql-30-bin
log_slave_updates=1
skip-name-resolve
3.配置从数据库服务器192.168.10.40
vim /etc/my.cnf
[mysqld]
server_id=40
log_bin=mysql-40-bin
log_slave_updates=1
skip-name-resolve
4.启动4台数据库服务
5.在2台主数据库服务器上做同步授权
mysql> grant replication slave on *.* to slave@"%" identified by "slave";
本文永久更新链接地址:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]
