实验需求:配置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";
本文永久更新链接地址:

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

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 strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

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

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)


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

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Dreamweaver CS6
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

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

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
