mysql replication - slave server on one database

前端 未结 2 849
小蘑菇
小蘑菇 2021-02-07 06:37

I couldn\'t find an answer to my question.

I have 2 mysql servers.

  1. Master server
  2. Slave server

Now i want to add another Slave serve

2条回答
  •  盖世英雄少女心
    2021-02-07 07:04

    Adding these lines to the /etc/my.conf file of the slave machine solved my problem. Thanks.

    replicate-do-db=Refill
    

    However, please note that after doing this i had to restart both the databases and update the new file name and position from the master server by typing below command:

    mysql> show master status;
    

    Add this information to your MySQL on slave machine and start slave.

提交回复
热议问题