hello stuck in restore of mysql via java IO
-
hi i have successfully done the backup process of mysql in java but when it came to restore i failed after trying for three hrs. and i desperately need it i dont know what i am doing wrong in my code , currently my IDE is netbeans
String ip="localhost";
String port="3306";
String database="dbname";
String user="user";
String pass="pass";
String path;
JFileChooser chooser = new JFileChooser();
chooser.setCurrentDirectory(new File("."));
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
chooser.showSaveDialog(null);
path = chooser.getSelectedFile().getAbsolutePath();
System.out.println(path);String dumpCommand ="mysql" + " -h" + ip +" -port"+ port + " -u" + user +" -p" + pass+" "+ database +" <"+path; //"mysql -hlocalhost -port3306 -uroot -pamit mms
it always shows some sql help commands in system.out and the command "<" is surely not accessing in java code instead by using it , it gives the output as unknown command \b (start of backupfile name as c:\backup.sql)
:confused: