I'm executing mysqldump command from a Java class but I keep getting the error mentioned in the title.
This is the code I'm using:
Process runtimeProcess = Runtime.getRuntime().exec("mysqldump -uroot -pmypassword valo > /etc/valbu.sql");
int processComplete = runtimeProcess.waitFor();
if(processComplete == 0){
System.out.println("Backup taken successfully");
} else {
InputStream stderr = runtimeProcess.getErrorStream();
InputStreamReader isr = new InputStreamReader(stderr);
BufferedReader br = new BufferedReader(isr);
String line = null;
System.out.println("<ERROR>");
while ( (line = br.readLine()) != null)
System.out.println(line);
System.out.println("</ERROR>");
System.out.println("Could not take mysql backup");
}
It looks like he doesn't understand that >
isn't a table but a command to dump.