Backup and restore dump of MySQL database

Tags:

How to create a dump file of a MySQL database with mysqldump command and restore.

Used
MySQL version 5.5.1.4
 
A simple way to copy or backup MySQL database is the use of mysqldump command in the command line.
 
mysqldump -u [user] -p --all-databases > [directory\filename].sql
 
to restore the database dump use the following:
 
mysql -u [user] -p < [directory\filename].sql
 
-u
-p
--all-databases
username
password
all databases, or use a specific database name

 

 


Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.