Report this

What is the reason for this report?

How to configure MySQL master and slave both run on only one physical host and achieve replication between the two

Posted on May 8, 2014

We want to setup MySQL Master as well as Slave to run on same physical host and achieve replication. How to do it? Steps with example would be great…

Thanks Rajiv



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.

Hi Rajiv, <br> <br>I’m curious. Whats the use case for this? I’m not sure I’ve ever see it done. While its technically possible, you loose a lot of the benefits of redundancy by having it on the same host machine. See this discussion over on DBA StackExchange: <br> <br>http://dba.stackexchange.com/questions/545/is-it-unwise-to-run-replication-on-same-physical-server <br> <br>How To Forge has a tutorial doing this by compiling two completely different mysql binaries: <br> <br>http://www.howtoforge.com/one_machine_mysql_replication <br> <br>I could also imagine doing it using lxc containers or docker.

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.