title: How to restore a MySQL database backup using Java
body: <p>I was able to create a <strong>backup of my current mysql database as .SQL</strong> file using the <strong>mysqldump.exe</strong> with the help of the following java code. </p>
  
  <pre><code> Process runProcess = Runtime.getRuntime().exec("C:\\SCM Files\\SQL Backup\\mysqldump.exe -uroot -p123 rr -r\"C:\\SCM Files\\SQL Backup\\RR.sql");
  </code></pre>
  
  <p>Now I want to <strong>restore this same .SQL Backup</strong> file to mysql database <strong>using java</strong> code similar to above on the event of a button clicked.</p>
  
  <p>Thanks a lot :) </p>
  
  <p>So now I tried this ;
  <code>Process runProcess = Runtime.getRuntime().exec("C:\\SCM Files\\SQL Backup\\mysqldump.exe -uroot -p123 rr &lt; C:\\SCM Files\\SQL Backup\\RR.sql");</code>
  Still it didn't work :/ </p>