Deploy MySQL high-availability clusters using mysql-mmm and MySQL master-slave synchronization
- Configuring the primary master structure
A, b host Settings
mysql> grant replication Slave on * * to [e-mail protected] "%" identified by "1";
A host
mysql> Change Master to master_host= "192.168.100.101", master_user= "user", master_password= "1", master_log_file= " Master2.000001 ", master_log_pos=106;
mysql> slave start;
Host B
mysql> Change Master to master_host= "192.168.100.100", master_user= "user", master_password= "1", master_log_file= " Master1.000001 ", master_log_pos=106;
mysql> slave start;
?
- Configuring a master multi-slave structure
C Host
mysql> Change Master to master_host= "192.168.100.101", master_user= "user", master_password= "1", master_log_file= " Master2.000001 ", master_log_pos=106;
D Host
mysql> Change Master to master_host= "192.168.100.101", master_user= "user", master_password= "1", master_log_file= " Master2.000001 ", master_log_pos=106;
?
- Install mysql-mmm software on all machines
Tar XF mysql-mmm-2.2.1.tar.gz
CD mysql-mmm-2.2.1
Make install
?
- Configure MYSQL-MMM to implement MySQL high availability cluster
mmm_common.conf--all servers need to be configured, all the same
Role: Specify the role of the server in the cluster and the virtual IP address used
?
Database servers are set up for database authorization
Mysql> Grant replication Client on * * to [e-mail protected] "%" identified by "monitor";
Mysql> Grant Replication Client,process,super on * * to [email protected] '% ' identified by ' agent ';
?
All database servers are configured
vim/etc/mysql-mmm/mmm_agent.conf????????
Include mmm_common.conf???????? Load mmm_common.conf
This host name???????? Specify your own host name
?
Monitoring Configuration
Day9-mysql Cluster