title: How do i import into mysql daily via cron or ssh
body: <p>I want to write a cron job to INSERT INTO 6 tables. I know that :</p>
  
  <ol>
  <li>The tables will always exist and will be empty, awaiting records</li>
  <li>I will have 6 .sql dump files On the server which will be ready to be imported.</li>
  <li>The format of the files are exactly as created by the phpMyAdmin export tool
  i.e. all already have a single INSERT INTO <code>tablename</code> line and multiple parenthisised value lines. </li>
  <li>All have foreign-key constraints set to off before the insert statement and toggled on again after the inserts.</li>
  </ol>
  
  <p>i wanted to do all from within PHP but on a shared hosting the exec() func is disabled and so is the FILES priviledge so my options are dwindling.</p>
  
  <p>I'm looking for a way to do the above from cPanel cron or SSH tools in cPanel. CRON would be my first choice since i'm unfamiliar with SSH.</p>
  
  <p><strong>Do i run this line 6 times (for each file) or can i consolidate it into one cron or ssh command? p.s. also do i use absolute or relative paths to the .sql dump files</strong></p>
  
  <pre><code>mysql -h localhost -u myusername -p mypassword mycatalogdb &lt; 'sqlcronfiles/dump-1.sql'
  mysql -h localhost -u myusername -p mypassword mycatalogdb &lt; 'sqlcronfiles/dump-2.sql'
  mysql -h localhost -u myusername -p mypassword mycatalogdb &lt; 'sqlcronfiles/dump-3.sql'
  mysql -h ... etc ...
  </code></pre>
  
  <p>thanks</p>