Java J2ee Tutorials

How to Upload and Take Backup of Large MySql Database File into Local Database Using Command Prompt

Monday, October 15, 2012

How to upload and take backup of large MySql database file into local database using command prompt
  1. Craete data base in your local database
  2. Copy the path where MySql bin folder is available in command prompt for example C:\wamp\bin\mysql\mysql5.5.24\bin
  3. Write command to store database : mysql -u root -p db_name.sql< C:\Users\Desktop\db_folder_name\db_name.sql
Where C:\Users\Desktop\db_folder_name\db_name.sql is the path where dump database is available and db_name.sql is the database name

Note:
u = username
p = password (write password after p without space)

How to take database backup
  1. Write command to command prompt : mysqldump -u root -p db_name > d:\class_db.sql
Where d:\class_db.sql is the path where you want to save backup file and class_bd is the name you want to save file as.

Free Career Predictions