Configure master-slave replication in Mysql5.5

Source: Internet
Author: User
Mysql provides the master-slave replication function, which is similar to oracle's slave uard. However, configuration and management are far simpler than slave uard, and there is no so-called physical slave database or logical slave database, no corresponding data protection mode is provided.

Mysql provides the master-slave replication function, which is similar to oracle's slave uard. However, configuration and management are far simpler than slave uard, and there is no so-called physical slave database or logical slave database, no corresponding data protection mode is provided.

Mysql provides the master-slave replication function, which is similar to oracle's slave uard. However, configuration and management are far simpler than slave uard, and there is no so-called physical slave database or logical slave database, there is no corresponding data protection mode. The Hong Kong server only has master and slave database roles. This architecture is widely used in major portals and game websites and provides the database read/write splitting function; in contrast, oracle's read/write function can be fully implemented with active standby uard in version 11. Otherwise, it can only use logical standby, but many data types and operations are not supported by the logical standby database! I have previously used the master-slave architecture of MySQL and for read/write separation of CMS databases. It has a very painful experience. due to various reasons, the master-slave data is not synchronized, then, no additional synchronization mechanism is provided (not learned), so the master-slave architecture is often reconstructed at the end of work. The next step is to test the mha architecture on the mysql5.5 platform, therefore, this article records how to build a master-slave Database Replication environment on the mysql5.5 platform. In addition, mysql's master-slave database can also be seen as mysql's real-time backup, which has certain data disaster recovery functions, mysql itself does not provide a hot backup tool similar to oracle rman. Therefore, in most scenarios, a real-time backup is performed on the database using the master and slave nodes for backup from time to time! PS: How does mysql do incomplete restoration based on time or SCN? Do I really need to analyze binlogs one by one?

I. Create an account for replication on the master database and test the connection on the slave database.

2. Modify the my. cnf file of the master database as follows. Pay attention to the red font section and restart the database instance.

3. Modify the file my. cnf from the slave database as follows. Pay attention to the red font section, server space, and restart the database instance.

4. Specify the connection information of the master database on the slave database and enable the synchronization process.

V. verify the data synchronization result. In version 5.1.36, you must create a database, Vm, and import table data from the slave database.

This article is from the "Bo Yue" blog and will not be reproduced!

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.