Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Swing-AWT how to backup and restore database using java

Have Programming Question? Ask it here!
 
 
 


padmanaban
how to backup and restore database using java
1 Answer(s)      4 years and 9 months ago
Posted in : Swing AWT



Advertisement
View Answers

December 8, 2009 at 2:27 PM


Hi Friend,

Try the following code:

import java.util.*;
import java.io.*;
public class BackUpSql {
public static void main(String[] args) {
try {
Runtime rt = Runtime.getRuntime();
rt.exec("cmd.exe /c start C:\\ab.bat");
System.exit(0);
}
catch(Exception ex){
ex.printStackTrace();
}
}
}

Here is the ab.bat:

set path=%path%;C:\Program files\MySQL\MySQL Server 5.0\bin;
mysqldump -uroot -proot register>C:\back.sql

where root is the username and password and register is the database.

For more information, visit the following link:

http://www.roseindia.net/mysql/mysql_backup_restore.shtml

Thanks


Related Tutorials/Questions & Answers:
how to backup and restore database using java - Swing AWT
how to backup and restore database using java  sir my project is to backup and restore my datas using java so i want to know how to backup and restore databases using java give ur ideas and suggestions to me immediately  
database backup and restore using java - JDBC
database backup and restore using java  Hi... I have MS Access 2000 database.I want to backup and restore the db using jdbc.What's the procedure for that. Thanks in advance
Advertisements
database backup and restore
database backup and restore  hi i m able to take backup through java code but i m unable to restore the same file through the restore code . please provide me some suggestion
how to take backup of phone to pc using java code
how to take backup of phone to pc using java code  i want to take the backup of phone data in my pc and also provide the restore functionality,and i want to do it using java program,so can anyone help me
In this section you will learn how to rename MySQL database.
into new database Take the backup of database using mysqldump utility... database using following command create database account2; and then restore...How to rename MySQL database? In this section we will learn the safest method
oracle database backup using jsp
oracle database backup using jsp   I want to take the backup... a backup of the database is stored in one of my local drives.Is it possible to do this task? If possible how can it be done
How to Restore The Lossed data in MYSQL database after the System is formatted
How to Restore The Lossed data in MYSQL database after the System is formatted  How to Restore The Lossed data in MYSQL database after the System is formatted
Backing Up and Restoring A MySQL Database
; This tutorial explains the how to backup and restore the MySQL Database. Databases...; backup data can be used to restore the Database. Backing Up MySQL Database MySQL... to restore the accounts database from accounts.sql backup file. mysql - u admin
Database backup
Database backup  I am developing c# application in which i am using Microsoft Access database (OLEdb connections). I want to take backup of database programaticaly. Or as i can tae it in sqlserver 2008 r2(.bak) file. How can i
Backing Up and Restoring A MySQL Database
; This tutorial explains the how to backup and restore the MySQL Database...; backup data can be used to restore the Database. Backing Up MySQL Database... to command to restore the accounts database from accounts.sql backup file. mysql - u
how to backup files and folder with Java
how to backup files and folder with Java  Does anyone know to create a backup with java?. backup files and folders from my computer to an external...(originalFile.getCanonicalPath() + ".backup"); originalFile.renameTo
how to take iphone backup using itunes
how to take iphone backup using itunes  Hi, Can anyone please tell me how to take iphone backup using itunes..?   You can find the details on apple website as well... anyhow i am giving you some tips as follow... How
PHP mysql database backup script - PHP
PHP mysql database backup script  How can i get the database backup using PHP mysql database
MySQL restore function in java - JDBC
MySQL restore function in java  I would like to import to a database .sql file. It is possible with the use of mysql administrator, however I would like to do the same with the use of java.Is it possible?If yes, how to do
Backup MySQL Database - JSP-Servlet
Backup MySQL Database  Database Sir I have been reading Rose's india tutorial "Using MySQL Database with JSP/Servlet". In the Tutorial you have shown an example of backing up the database. When I tried to backup database
php backup database script - PHP
php backup database script  please post the backup database script in PHP. Thank u very much
restore all mysql database:cPanel MYSQL 5.1 to 5.5
restore all mysql database:cPanel MYSQL 5.1 to 5.5  restore all mysql database:cPanel MYSQL 5.1 to 5.5
Learn how to take MySQL Backups and restore the same.
Learn how to take and then restore the MySQL database backup. You can use mysqldump utility to take the backup of MySQL database and tables with or without.... Following example shows how to take MySQL backup
Java backup pst file
Java backup pst file  Hello!! i need some help please. Im new in Java. How can i create a java program to backup any files and folders (like PST files)in my computer at a specific time
how to take a backup of a table in sql
how to take a backup of a table in sql  how to take a backup of a table in sql?   SQL BackUp Table example
I Want to take mqsyl batabase backup using jsp
I Want to take mqsyl batabase backup using jsp   I was develop web portal using jsp and servelt. I need to take backup my MySQL database and restore another one MySQL database.   import java.util.*; import java.io.
java program to take backup for the folders
java program to take backup for the folders  java program to take backup for the folders   Have a look at the following link: Java Copy one folder to another
How to insert dynamic textbox values into database using Java?
How to insert dynamic textbox values into database using Java?  Hi I am trying to insert dynamic textbox values to database, my jsp form have 2... these dynamic textbox values to database(Oracle 11g)...Please help me out. I have
How to Open Picture From M.S. Access Database using Java Servlet ?
How to Open Picture From M.S. Access Database using Java Servlet ?  ... Database But i m still not able to open this picture through Java using M.S. Access and i wants to open this Picture On Web Browser using Java Servlet anybody can
How to Retrieve Data from the database and write into excel file using Java
How to Retrieve Data from the database and write into excel file using Java  Hi, I am trying to develop an small application where i trying to retrieve Data from the database and store the details in excel file. Please can
how to store image file and videofile in ms access database using java? - JDBC
how to store image file and videofile in ms access database using java?  how to store image file and video file in ms access database using java
How to export data from database to excel sheet by using java in standalone project
How to export data from database to excel sheet by using java in standalone project  How to export data from database to excel sheet by using java in standalone project
how to retrieve image from mysql database using java and show it in HTML img tag ?
how to retrieve image from mysql database using java and show it in HTML img tag ?  how to retrieve image from mysql database using java and show it in HTML img tag
backup your MySQL data using mysqldump:cPanel MYSQL 5.1 to 5.5
backup your MySQL data using mysqldump:cPanel MYSQL 5.1 to 5.5  backup your MySQL data using mysqldump:cPanel MYSQL 5.1 to 5.5
How to save database data into excelsheet using hibernate
How to save database data into excelsheet using hibernate  How to save database data into excelsheet using hibernate
how to connect to database in php using mysql
how to connect to database in php using mysql  how to connect to database in php using mysql
How to show database values into graph using jsp?
How to show database values into graph using jsp?  How to show database values into graph using jsp
How to show database values into graph using jsp?
How to show database values into graph using jsp?  How to show database values into graph using jsp
database connection by using java bean
database connection by using java bean  i need a code for bean class to connect to mysql database. subsequently to use dis bean class whereever i need 2 connect 2 database
How to create bar chart using database values
How to create bar chart using database values  How to create bar chart using database values i.e excellent,good,average fields using jsp?It is like opinion poll.I want to show how many votes are came for excellent,good,average
how insert multiple images in mysql database with use of struts 1.3.8 or java method, with single bean,or using array
how insert multiple images in mysql database with use of struts 1.3.8 or java method, with single bean,or using array  i am using netbeans 7.0 ,with struts 1.3.8 and i want to insert multiple images in mysql database ,with use
how to save uploaded image in database using javascript
how to save uploaded image in database using javascript  Please can you tell me how to store uploaded image in database using java I'll use...; Now i want to store it on database... Please help me Thanks in Advance
How to export data from database to excel sheet by using java swing in standalone project - Java Beginners
How to export data from database to excel sheet by using java swing... database to excel sheet by using java swing in standalone project.I get solution from... solution by using java swing programming. please send me reply to me
how to store multiple values from drop down in database where i am using java struts 1.3
how to store multiple values from drop down in database where i am using java struts 1.3  hii, i am coding a form where i need a keyskills attribute... is displaying.. i need code in java so that it takes multiple values
SQL Backup Script
in specific komal database and backup of all the databases. Command for Backup of one database: The below given command create a backup of one database name 'komal... for Backup of all database: The below command is used to create a backup of all
how to create database and table using jsp
how to create database and table using jsp  hi frnds...., i want to create database and table in mysql using jsp.... i have an registration form(name... for each user to store their details.. so pls help me how to create individual
how to insert data into database using jsp & retrive
how to insert data into database using jsp & retrive  Hello, I have created 1 html page which contain username, password & submit button. in my oracle10G database already contain table name admin which has name, password
how to display a table from database using servlet
how to display a table from database using servlet  how to display a table with values from servletpage   Hi Friend, Please go through the following link: http://roseindia.net/jsp/servlet-jsp-data-list.shtml Thanks
How to delete the row from the Database by using servlet
How to delete the row from the Database by using servlet  Dear Sir/Madam I am trying to delete the one user data in the Oracle SQL server database...: Delete row from database using servlet   In that link solution
How to insert multiple checkboxes into Msaccess database J2EE using prepared statement - Java Beginners
How to insert multiple checkboxes into Msaccess database J2EE using prepared... statement to do the checked boxes part, I'm not sure how to go about doing... - meaning, the data goes to my Ms Access Database. You are the GREATEST
How to backup a selected file from the dropDown Menu in JSP?
How to backup a selected file from the dropDown Menu in JSP?  I am trying to create a dropdown menu list for some type of files contained ina... file into the backup directory. I need the jsp code that can generate
how to insert checkbox value into database using jsp
how to insert checkbox value into database using jsp  how to insert check box value to the database using jsp my code is <link href="font&colors.css" rel="stylesheet" type="text/css"> <p></p>
how to insert checkbox value into database using jsp
how to insert checkbox value into database using jsp  How to insert check box value to the oracle database using jsp? I want to create hotel's... into database. 1)checkbox.jsp: <html> <body> <form method="post
cold backup, hot backup, warm backup recovery
cold backup, hot backup, warm backup recovery  What is cold backup, hot backup, warm backup recovery
how to insert data in database using html+jsp
how to insert data in database using html+jsp  anyone know what... and database name. Here machine name id localhost and database name..."; // declare a connection by using Connection interface
 

 

 

DMCA.com