How to find the error if the database name not exist in mysql. Database name like demo. I provide this following example code
String dumpCommand = "C:/Program Files/MySQL/MySQL Server 5.0/bin/mysqldump -h"+hostName+user+demo(//database name);
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(dumpCommand);
InputStream in = proc.getInputStream();
BufferedReader br=new BufferedReader(new InputStreamReader(in));
String line =null;
while((line=br.readLine())!=null)
{
//.....
}
This code will run successfully even database name not contains in mysql