Day9-mysql Cluster

Source: Internet
Author: User

Deploy MySQL high-availability clusters using mysql-mmm and MySQL master-slave synchronization

    1. 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;

?

    1. 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;

?

    1. Install mysql-mmm software on all machines

Tar XF mysql-mmm-2.2.1.tar.gz

CD mysql-mmm-2.2.1

Make install

?

    1. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.