If you have any questions please post them as a comment & I’ll try my best to answer them. That’s all about creating & restoring backups. I have tested all the commands and the methods mentioned in this post and they worked fine in Windows environment. Int processComplete = runtimeProcess.waitFor() RuntimeProcess = Runtime.getRuntime().exec(executeCmd) Public boolean backupDB(String dbName, String dbUserName, String dbPassword, String path) Here’s a sample method to create a complete database backup including add, drop MySQL statements. ![]() ![]() Here we execute this mysqldump command using the java Runtime. When we install MySQL open source database it provides us a client called mysqldump for backup purposes. In this post I’m expecting to give you guys a rough idea about backing up and restoring your MySQL database through a Java Application. Sometimes it is necessary to integrate a backup & restore system to an application we are developing. ![]() If anyone wants to backup or restore a database without going through all these troubles, you can simply use MySQL GUI Tools Bundle freely distributed by the Oracle Corporation. It’s about database backups and restores through java. ![]() Today I thought about posting something I’ve learnt recently. Luckily I’m in a mood to write something at the moment. It’s been a while since I’ve written a blog post.
0 Comments
Leave a Reply. |