Hi Members,
I have to restore my mysql database using
java application.
I have to run mysql command line syntax from java runtime.exec(String command).
I tried to do so--->
Runtime.getRuntime().exec("cmd /c mysql --host localhost --port 3306 -u root -p sasa attestdb < c:/backup.sql");
If i run this, im getting the 'mysql version and its option details displayed in the console'... instead my database is not restored/updated.
If we use cmd or cmd.exe in the exec() method, it will work only in windows, but for me it should work both in linux and windows..
Please help me int this...
Looking forward for your reply...
regards,
Prabhu.