I have read-only access to a remote MySQL database, which contains a very large table (hundreds of millions of lines).
To get faster access to that table, I want to copy it to my local database.
What is the best way to do this?
“SELECT INTO OUTFILE” doesn’t work, because I don’t have the required permissions on the remote database.
I tried to use Java to SELECT all rows FROM the remote table, save them to a local text file, then use LOAD DATA INFILE; however, the select broke with
“Exception in thread “main” java.lang.OutOfMemoryError: Java heap space”.