Advertisement
Guest User

Untitled

a guest
Apr 28th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. String command = mySqlPath + "mysql.exe";
  2. String user = "-u " + settings.dbUser;
  3. String password = "-p" + settings.dbPassword;
  4. String db = settings.dbDatabase;
  5. String inputFile = filePath + mySqlDumpFile;
  6.  
  7. String combined = command + " " + user + " " + password + " " + db + " < " + inputFile;
  8.  
  9. ExternalCommandExecuter ece = new ExternalCommandExecuter(combined);
  10. int code = ece.execute();
  11.  
  12. C:softwaremysql5binmysql.exe -u root -p<password>
  13. db_name < C:softwaretomcat7webappsROOTWEB-INFdocumentsdump-1461789460425.sql
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement