Is it possible to perform MySQL replication from the master database on Linux to a slave database 开发者_如何学Gorunning on Windows?
Also, an SSH connection must be established between the 2 servers; I'd like to be able to have a script on the slave Windows machine that would run periodically, establish the connection, wait for the replication to finish, and then drop the connection. So, pull from the client rather than push from the master. Is this possible/reasonable/difficult?
(1) Yes, MySQL replication doesn't care about which OS its running on. There may be some corner cases with oddly named files, though. But that'll break the initial load, so you'll find out quick.
(2) You can use 'slave stop/start io_thread' to control the replication, so it runs when your SSH connection is up. You can check how far the replication has gotten (actually, only the IO thread matters, not the SQL thread) by using show master status
& show slave status
. You may also want to consider a "proper" VPN, such as OpenVPN (instead of ssh port forwarding).
精彩评论