title: MySQL import to existing database
body: <p>Currently I am importing a database dump file <code>sample.sql</code> to the application. I need to import the database and append to the existing tables since the database contains same tables and fields. </p>
  
  <p>How can I solve the issue? What is the command to append the imported database to existing database?</p>
  
  <p><strong>The code to import file</strong></p>
  
  <pre><code>try {
  
      String[] command = new String[]{"\""+this.m_MySqlPath+"mysql\"", Constants.DB_NAME, "-u" + Constants.DB_USER, "-p" + Constants.DB_PASSWORD, "-e", " source "+"\""+FileName+"\"" };
      Process runtimeProcess = Runtime.getRuntime().exec(command, null, new File(this.m_MySqlPath));
      int processComplete = runtimeProcess.waitFor();
  
      if (processComplete == 0)
      {
          System.out.println("DatabaseManager.restore: Restore Successfull");
      }
      else 
      {
          System.out.println("DatabaseManager.restore: Restore Failure!");
      }
  </code></pre>