How to add new tables to list for mySQL replication?

Problem :

I newbie in mySQL replication and I would like to setup permanent replication only for some selected tables.

That is why I am thinking about filtering by this my.cnf command: replicate-wild-do-table= mydb.%Replicate

It does it means that all tables I would like to replicate will have "Replicate" suffix. Is this good solution or is there something better?

Thank you for your tips!


Solution :

I think of a few cons when using a suffix:

  • Depending on the suffix you choose, you may end up with table names having that suffix but that you don't want to replicate
  • If you decide to change the fact that a table is replicated or not, you have to change the table name, which means changing all the stuff depending on that table name (generally, source code).

Therefore, I suggest list in my.cnf all the tables requiring replication, using as many replicate-do-table directives as necessary.

Mysql Tutorials

Mysql Howto..

How to update fields form a select statement in MySql with a WHERE clause?

How to Encrypt Stored Procedures in MySQL?

MySQL - How to normalize column containing delimiter-separated IDs

how to store constants in mysql

How to pass a ResultSet response to a JOptionPane showMessageDialog

MySQL: how to use comma, single quote, and double quote as columns?

How to store/retrieve HTML in MySQL using .Net (C#/VB)

How to write a MySQL query that returns a temporary column containing flags for whether or not an item related to that row exists in another table

How to develop a quiz based android application [closed]

how do i minimize this MySQL query to one?

How to import an SQL file using the command line in MySQL?

How to setup inno db in mysql 5.5.8

MySql & PHP - How to convert a string to DATETIME

how to get largest number in mysql using php

How to insert date and user_id to mysql

How to deal with “partial” dates (2010-00-00) from MySQL in Django?

Silex and Doctrine mysql: how to return results from select all

How to replace Mysql enum values for sorting

How to use Cron and Codeigniter/PHP to query a MySQL database?

How to skip row when importing bad MySQL dump

MYSQL: how to find entries corresponding to MIN() of costly function

how can i get mysql results with alphabetical pagination

How to do this simple MySQL statement without resorting to a sub query?

How to get data from different associated tables using containable in Cakephp?

how to calculate a bill from several tables on mysql?

How to display mysql data in html rows

How to import data from external mysql db into a Symfony2 Project?

Onsen UI After log in verified with Angular from mysql, how can I show my main screen?

MySQL: How to divide

How to manage secret Key in java