i am trying this command in java
executeCmd = DBConfig.dbLocation + "\\mysqldump -u " + mysqlUser +
" -p"+DBConfig.dbPass + " " + DBConfig.dbName +
" -r -opt>supervisorDbBkup.sql";
Its giving me code 1 instead of 0
String executeCmd = "";
executeCmd = DBConfig.dbLocation+"\\mysqldump -u"+mysqlUser+
" -p"+DBConfig.dbPass+" "+DBConfig.dbName+" -r -opt>supervisorDbBkup.sql";
Process runtimeProcess =Runtime.getRuntime().exec(executeCmd);
int processComplete = runtimeProcess.waitFor();
if(processComplete == 0){
return "Backup taken successfully";
} else {
return "Could not take mysql backup";
}
this is the command which i am running :
E:\program file\MySQL\MySQL Server 5.5\bin\mysqldump -uroot -p0502 dashboardsupervisor -r -opt>supervisorDbBkup.sql
any idea
executeCmd.