Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm fairly new to databases so I hope this isn't a silly question!

Is it possible to set up master/slave replication on the SAME server?

I understand there are not any advantages to this in terms of hardware utilisation/recovery purposes, but a set up like this would help test a piece of software I am developing.

share|improve this question
up vote 2 down vote accepted

It's possible, why not. You have to run two instances of MySQL. One will be a master, second - a slave.

Check this for detailed instructions https://dev.mysql.com/doc/refman/5.5/en/multiple-servers.html

share|improve this answer
    
I thought about that, but I was concerned about potential conflicts. Thanks for your help! – Stephen91 Feb 19 '14 at 13:41

The best way to setup replication for testing purpose on a local machine is to use MySQL Sandbox very easy to setup and manage multiple Master-Slave and different replication methods.

http://mysqlsandbox.net/

share|improve this answer

Developers often work on only one machine, and have their whole development environment on that machine. Testing database replication before deploying changes in this kind of a development environment can be a challenging task. In this article, Toptal engineer Ivan Bojovic guides us through a step-by-step tutorial on how to implement MySQL Master-Slave Replication on the Same Machine.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.