
Now we will edit the file “/etc/mysql//mysqld.cnf”. Make sure that the following line is present in this file: !includedir /etc/mysql// (This file does nothing but includes the files from other directories.) Open MySQL configuration file /etc/mysql/my.cnf to confirm that the line with “/etc/mysql//” is present. In our setup, the MySQL configuration is included from files in another directory. Step2: Configure MySQL to listen on Private IP address While configuring our servers for replication, we need to make sure that this ID is not duplicated. All the servers in this group have unique ID.

The MySQL instances participating in replication are part of a (replication) group.

For the purpose of this demo, we will replicate only 1 database(as in case 1). You can also use both of these options simultaneously if that is what you want. We just put the databases that don’t need to be replicated (like “information_schema” and “mysql”) with the option “binlog_ignore_db”. MySQL will replicate all of your databases by default if you don’t put this option in the configuration. So in this case, don’t use the option “binlog_do_db”.

You may want to create new databases in the future and adding them to the list manually could be a problem. Use Case 2: You need all of your databases to replicate except a few. The database names for replication are specified with “binlog_do_db” option in MySQL configuration file. Use Case 1: You need to replicate only selected number of databases.
