Reputation: 368
How do I go about setting up replication on the same mysql server, i.e master and slave both will be the same server?
My requirement is this: I want to replicate few tables on db2 with db1 located on the same server but not all the tables.
I searched the whole the net there are few example like shown here http://www.ruturaj.net/tutorials/mysql/replication/same-server-rewrite-database but doesn't work for me.
And many examples which explain about the replication setup on two different server Can anybody please redirect me to the right link, if any available?
Thanks
Upvotes: 6
Views: 489
Reputation: 3008
Not a big deal; just set up two mysql servers on two different port number. I've used to choose 3306 for master, and 3307 for slave.
And this is my - very - subjective opinion : separate to-be-replicated and not-to-be-replicated on [database] level not on table level. MySQL supports detailed configuration for replication level, but it'll be very complicated and make others confused after months, years later.
Upvotes: 1