Extracting Data Daily from MySQL to a Local MySQL DB

Posted by Sunny Juneja on Stack Overflow See other posts from Stack Overflow or by Sunny Juneja
Published on 2012-10-25T22:39:19Z Indexed on 2012/10/25 23:01 UTC
Read the original article Hit count: 184

Filed under:

I'm doing some experiments locally that require some data from a production MySQL DB that I only have read access to. The schemas are nearly identical with the exception of the omission of one column. My goal is to write a script that I can run everyday that extracts the previous day's data and imports it into my local table.

The part that I'm most confused about is how to download the data. I've seen names like mysqldump be tossed around but that seems a way to replicate the entire database. I would love to avoid using php seeing as I have no experience with it. I've been creating CSVs but I'm worried about having the data integrity (what if there is a comma in a field or a \n) as well as the size of the CSV (there are several hundred thousand rows per day).

© Stack Overflow or respective owner

Related posts about mysql