Cron to import local SQL file

Discussion in 'Site & Server Administration' started by bigpapa, Nov 12, 2008.

  1. #1
    I am looking for how to create a cron job that will take a local .sql file and import it into a local DB.


    Suggestions??

    Thanks
     
    bigpapa, Nov 12, 2008 IP
  2. Mxhub

    Mxhub Active Member

    Messages:
    474
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #2
    It's possible.

    Create a php file with the mysql query to import the .sql file to your desire DB.

    And setup a cron to run that php file at the time you want..

    --
    joseph
     
    Mxhub, Nov 12, 2008 IP
  3. bigpapa

    bigpapa Banned

    Messages:
    273
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That sounds good to me... :)

    Now all Ive got to do is figure out how to do that. Anyone have suggestions?
     
    bigpapa, Nov 13, 2008 IP