List command=new ArrayList();
command.add("\""+exec_path+ "mysqldump\"");// is this work?
command.add("--opt");
command.add("--user=root");
command.add("--lock-all-tables=true");
command.add("--result-file=" + dumpedFilepath+File.separator+SERVER_BACKUP_SQL_FILE);
command.add("orca");
String[] str=dbs.split(" ");
for(int i=0;i<str.length;i++)
command.add(str[i]);
private Runtime cmd = Runtime.getRuntime();Process p = cmd.exec((String[])command.toArray(new String[0]),null); String line;
BufferedReader br=new BufferedReader(new InputStreamReader(p.getErrorStream()));
while ( (line = br.readLine()) != null)
log.error("<<<<<<<" + line);
command.add("\""+exec_path+ "mysqldump\"");// is this work?
command.add("--opt");
command.add("--user=root");
command.add("--lock-all-tables=true");
command.add("--result-file=" + dumpedFilepath+File.separator+SERVER_BACKUP_SQL_FILE);
command.add("orca");
String[] str=dbs.split(" ");
for(int i=0;i<str.length;i++)
command.add(str[i]);
private Runtime cmd = Runtime.getRuntime();Process p = cmd.exec((String[])command.toArray(new String[0]),null); String line;
BufferedReader br=new BufferedReader(new InputStreamReader(p.getErrorStream()));
while ( (line = br.readLine()) != null)
log.error("<<<<<<<" + line);
mysqldump -uroot ismappnew>f:/test.sql
能成功吗?