title: What is the difference between binlog-do-db and replicate-do-db?
body: <p>I'm a beginner for MySQL Master-Slave .</p>
  
  <p>and I have read two tutorials .</p>
  
  <ol>
  <li><p><a href="https://www.tecmint.com/mariadb-master-slave-replication-on-centos-rhel-debian/" rel="noreferrer">How to Setup MariaDB (Master-Slave) Replication</a></p></li>
  <li><p><a href="https://www.unixmen.com/setup-mariadb-master-slave-replication-in-centos-7/" rel="noreferrer">Setup MariaDB Master-Slave Replication</a></p></li>
  </ol>
  
  <hr>
  
  <p>In first tutorial. It make me that </p>
  
  <pre><code>[mysqld] Master section
  
  log-bin
  
  server_id=1
  
  replicate-do-db=employees
  
  bind-address=192.168.0.18
  
  
  [mysqld] SLAVE Section
  
  server_id=2
  replicate-do-db=employees
  </code></pre>
  
  <hr>
  
  <p>But in the second tutorial, it show me that </p>
  
  <pre><code>[mysqld] Master
  server_id=1
  log-basename=master
  log-bin
  binlog-format=row
  binlog-do-db=unixmen
  
  [mysqld] Slave
  server-id = 2
  replicate-do-db=unixmen
  </code></pre>
  
  <hr>
  
  <p>And why I should LOCK TABLES, and mysqldump sql, then import it ?</p>
  
  <pre><code>FLUSH TABLES WITH READ LOCK;
  </code></pre>
  
  <hr>