Is it possible to apply the Replication mechanism on single MySQL server?
Is it possible to apply the Replication mechanism on single MySQL server?
I want to replicate the c开发者_StackOverflow中文版hanges done in test db to Main db in the same server, so can i use this Replication mechanism on same server?
Not within the same server - the replication logs include the database name a command was executed against, and there isn't a way to change this.
You could however run two instances of MySQL on separate ports, allowing you to have two databases of the same name, and set up replication between the two. You'd need to have two separate installations of MySQL using different my.ini files and different data directories for this to work.
精彩评论