I have followed all the rules for replication. The steps are I have changed the my.cnf file. My db name is new_db.
server-id = 1
log_bin = D:/xampp/mysql/mysql-bin.log
binlog_do_db = new_db
Grant the replication for slave
GRANT REPLICATION SLAVE ON *.* TO 'slave_user'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
USE new_db;
FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS;
After that the result is
mysql> SHOW MASTER STATUS; +------------------+----------+--------------+------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | +------------------+----------+--------------+------------------+ | mysql-bin.000003 | 481 | | | +------------------+----------+--------------+------------------+ 1 row in set (0.00 sec)
Binlog_Do_DB column is empty. new_db should be there.
I don't understand what I missed. Please help to solve the problem.