Search code examples
mysqlcsvtransferschedule

How to go about updating a MySQL Table from a CSV file every [time interval]?


Firstly, I understand that attempting to do this from MySQL itself is not allowed:

http://dev.mysql.com/doc/refman/5.6/en/stored-program-restrictions.html

When I try to use LOAD DATA INFILE 'c:/data.csv' ... , I get the "LOAD DATA IS NOT ALLOWED IN STORED PROCEDURES".

I am a beginner with moving data around MySQL and I realize this may not be a task it was designed to handle. Therefore, what approach should I use to grab data from a CSV file and append it to a table at a regular time interval? (I have researched a little bit about CRON, but that is for UNIX systems only and we are using a Windows based OS.)


Solution

  • You can run CRON job on windows also. I have found a couple of links after searching. Please look in to these links:

    waytocode.com/2012/setup-cron-job-on-windows-server
    
    http://stackoverflow.com/questions/24035090/run-cron-job-on-php-script-on-localhost-in-windows