MySQL Cross Server Select Query

mysqldump could be a solution as mentioned already or you could try using the SELECT … INTO OUTFILE and then LOAD DATA INFILE … commands.

MySQL does have the federated storage engine which might be useful to you. Here’s some more documentation on it I have to confess that I’ve not had huge success with it but it might work for you.

The third solution would be to do the work in your application. Read in the results of the SELECT query line by line and INSERT to the other server line by line. You might run into some issues with data types and null handling that way though.


电子邮件地址不会被公开。 必填项已用*标注