I couldn't find an answer to my question.
I have 2 mysql servers.
- Master server
- Slave server
Now i want to add another Slave server but i have other website running on that server.
Can i replicate just one database?
I couldn't find an answer to my question.
I have 2 mysql servers.
Now i want to add another Slave server but i have other website running on that server.
Can i replicate just one database?
Adding these lines to the /etc/my.conf file of the slave machine solved my problem. Thanks.
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:
Add this information to your MySQL on slave machine and start slave.
Yes you can
If you want to replicate just one database from master, you can set
replicate-do-db
in your/etc/my.cnf
or setreplicate-do-db
as mysql argument, for example:If you have multi databases to be replicated,
/etc/my.cnf
should be like this:If you just want slave to ignore some database, you can set
replicate-ignore-db
:More details on MySQL document: http://dev.mysql.com/doc/refman/5.1/en/replication-options-slave.html#option_mysqld_replicate-do-db