MySQL Replicate-ignore-db Detailed

Source: Internet
Author: User

1: The official explanation is: in a master-slave synchronization environment, REPLICATE-IGNORE-DB is used to set up libraries that do not need to be synchronized. The explanation is too simple, but there are still a lot of holes in it.

Setting filter rules is not recommended on production libraries. If you want to set it, then use replicate_wild_ignore_table:mysql.%. The experiment is very simple, as follows

First case from library: replicate-ignore-db = mysql Main library: Use Mysqlcreate TABLE test.testrepl1 (id int (5)) Engine=innodb DEFAULT charset= UTF8; not synchronized from library. Pit the second case from library: replicate-ignore-db = mysql Main library: Use Testcreate TABLE mysql.testrepl2 (id int (5)) Engine=innodb DEFAULT charset= UTF8; not synchronized from library. In the third case, use testupdate mysql.user set user = ' Testuser5 ' where user = ' TestUser1 '; the fourth case is synchronized from the library grant all on *. * to [email Protec Ted] '% ' identified by ' Ge0513.hudie '; sync from library Second class: Replicate_wild_ignore_table:mysql.% fifth case Main Library: use Testupdate mysql.user Set user = ' TestUser1 ' where user = ' testuser5 '; not synchronized from library. Sixth Case Main Library: Grant all on * * to [email protected] '% ' identified by ' Ge0513.hudie '; no sync from library.

  

MySQL Replicate-ignore-db Detailed

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.