I found a java code for DB backup. This work properly
String sql1 = "C:\\Program Files (x86)\\MySQL\\MySQL Server 4.1\\bin\\mysqldump -uroot - p123 exepro -r C:\\Users\\Dell\\Desktop\\Backup\\"+jLabel1.getText()+".sql";
Runtime.getRuntime().exec(sql1);
JOptionPane.showMessageDialog(rootPane, "Success");
and also a restore code from my teacher as fallows
String[] executeCmd = new String[]{"D:\\mysql",databaseName, "-u"+ username, "-p"+ password, "-e", "source D:/sqlbackup.sql"};
Problem is I have no idea how to implement this code to my application.Can you give an answers related to my backup code.
you can use this simple code to restore your database