Answer the question
In order to leave comments, you need to log in
Copying a MySQL Windows=>Linux database without long locks
Greetings! I ran into a small problem, I need advice, I hope the community can help.
There is a remote MySQL server running on Windows (and don't ask why) with two large databases (500 MB and constantly growing). There is a very frequent recording in the database, complex modifying queries and copying data from one to another.
It is necessary to run a web application on a separate server (Linux) that will provide users with information from one of these databases, the data is taken exclusively for reading. The application will be used by several people at the same time, so the task is to periodically copy the database to the web application server. The relevance of the data is not great: 10-60 minutes. You can lock tables for a maximum of ~30 seconds.
1) Replication is not suitable, since a bunch of modifying requests will come from the main server, so everything will fall apart.
2) mysqldump is too slow, will lock tables for too long.
3) Percona / mysqlhotcopy - not suitable, because the head server is on windows.
4) The option remains only with SELECT INTO OUTFILE and LOAD DATA INFILE with a selection of only changed records (enter a field with "ON UPDATE CURRENT_TIMESTAMP").
Am I going in the right direction, or is there a more elegant solution?
Answer the question
In order to leave comments, you need to log in
Why replication is not suitable for you. Binary logs are used there and the changes will simply be copied, and queries on the second server will not be executed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question