开发者

MySQL replication from Linux to MySQL on Windows over SSH?

开发者 https://www.devze.com 2023-02-02 22:36 出处:网络
Is it possible to perform MySQL replication from the master database on Linux to a slave database 开发者_如何学Gorunning on Windows?

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消