Centos Mysql Master-Slave synchronization build and color 38 platform repair

Source: Internet
Author: User
Make sure the primary database is the same as the data from the database

"Master server" color 38 platform Repair (Enterprise e: 217 1793 408)

1. Create an account for backup from the server and only need to grant replication slave permissions.

mysql> CREATE USER ' forslave ' @ '% ' identified by ' 123456 ';

Mysql> GRANT REPLICATION SLAVE on . To ' forslave ' ('% ');

You can also create directly using phpMyAdmin

Can not map all IP, only intranet-related servers

There may be 3306 firewall ports that need to be opened

2. Configure MY.CNF as follows

[Mysqld]

Server-id=1

Log-bin=mysql-bin#binlog Name

#binlog-do-db=mstest//MSTest database to be synchronized, to synchronize multiple databases, add several replicate-db-db= database names #binlog-ignore-db=mysql//database to ignore

3 Restarting the database

View Primary Server Status

Mysql> Show master status;

Log file name and position value, which are later configured to be used from the server

Centos Mysql Master-Slave synchronization build and color 38 platform repair

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.