0

I have master/slave replication running. I only want it to replicate the mydb database. This is the master config.

[mysqld]
bind-address=0.0.0.0
server-id=1
binlog_do_db=mydb
log_bin=/var/log/mysql/mysql-bin.log
expire_logs_days=10
max_binlog_size=100M
binlog_ignore_db = mysql

The master appears to be completely ignoring the binlog_do_db=mydb.

mysql> SHOW MASTER STATUS;
+---------------+----------+--------------+------------------+-------------------+
| File          | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+---------------+----------+--------------+------------------+-------------------+
| binlog.000013 |      446 |              |                  |                   |
+---------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)

Further, it's ignoring this too log_bin=/var/log/mysql/mysql-bin.log as there's no mysql-bin.log in the /var/log/mysql/ folder.

Running Ubuntu 20.04 LTS and MySQL 8.0.28-0ubuntu0.20.04.3.

3
  • I hope that ** is not in the file.
    – Rick James
    Commented Feb 14, 2022 at 3:03
  • ** is not in the file - question updated.
    – HenryHayes
    Commented Mar 13, 2022 at 11:50
  • And you performed a CHANGE MASTER on the Replica to get replication started? What does it's SHOW SLAVE STATUS say?
    – Rick James
    Commented Mar 13, 2022 at 17:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.