Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Database synchronisation on the same sever for mysql

$
0
0

I need to have two databases placed on the same mysql server synchronised. This synchronisation is not used for replication, but for statistics, and the information on the second base do not have to be necessarily "fresh".

Currently, I'm doing a simple mysqldump every nigth, which could be a solution, but well, it's dirty.

So I thought about using mysql replication, and encountered 2 major problems : - I can't figure how to make it work if the two databases are on the same server. - I don't know how to perform the replication only once a day, at a precise time.

I'm using mysql 5.1.49 on windows (well, only for my tests, the production server is on linux), here is what I tried in my my.ini file

# Replication
server-id = 1

report-host = master-is-slave-host
log-bin = "d:/localhost-binlog"
log-error = "d:/localhost-errorlog"
relay-log = "d:/localhost-relaylog"

binlog-do-db = dev_nbe_msg_metier
replicate-rewrite-db = base1->base2

replicate-same-server-id = 1

The logs work fine, unfortunately that's all I can get, I tried several options, but could not make it work.

If anyone has a solution, or a better way to do this synchronisation, I'd be glad to hear it.


Viewing all articles
Browse latest Browse all 17268

Trending Articles