I am wondering if there is such a way to automatically run SQL queries and export to file (example: csv file) and then FTP to desired location? It seems simple and would need something like this as it would be very time consuming doing this manually.
Any info is greatly appreciated!
You can do that with CRON jobs (or schedule windows task).
Query to export to csv looks like:
You can schedule the query to run with CRON and the ftp commands too.
cron
jobs (man cron
for usage) are how you would schedule the process.Off the top of my head, your actual script (run by the cron job) would do the following:
mysqldump
to export the databaseftp server < commands.txt
)