Report this

What is the reason for this report?

Can we replicate slave with different database name?.

Posted on June 19, 2018

Currently, I’m doing with same DB name. I’m planning to have centralized DB replication for 3 servers. but the problem is the name of the database in all servers is same.

Can we replicate to slave with different name as shown below?

Master database to replicate : abc

Salve database: abc_1



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You should technically have the database name be the same, because the database is replicated it is an exact copy so you want to make sure that the naming remains consistent. I’m not 100% sure if you can even replicate it with a different name, as I’ve never really seen that request before. Not sure what the reasoning for using a different name would be.

You instead use the hostnames of the different DB servers to designate which one is the master, and which ones are the replicas, as well as of course the configuration of the DB itself which specifies that.

But you want to confirm with standard practices to ensure that everything works smoothly, so I would recommend to not switch the database names.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.