I have a mysql read-only replication slave setup and currently working for about 10 databases and I need to add 3 new databases. I cannot find any information on how to add additional information. Does anyone have some guidance on how to do this?
Thanks.
Best Answer
I am assuming an operational replication configuration with your MySQL servers.
First, you create the database on the master. On the slaves, you update your cnf specifying
replicate-do-db
for the new databases.replicate-do-db
is configured in either the cnf or as a flag (--replicate-do-db
) and cannot be changed dynamically as a variable.tdFrom that point, you can populate the schema and master on the data and replicate down.
You can also create and populate the database on the master and all slaves then enable
replicate-do-db
. The key is making sure that the data matches before enabling replication on the slaves.