Home Features Pricing Support Contact

How can I backup and restore database?

Article ID: 226
Last updated: 08 Feb, 2010

You can use mysqldump to create a simple backup of your database using the following syntax:


mysqldump -u [username] -p[password] -h[host] [databasename] > [backupfile.sql]


 mysql -u [username] -p[password] -h[host] [databasename] < [backupfile.sql]

  • [username] - this is your database username
  • [password] - this is the password for your database
  • [databasename] - the name of your database
  • [host] - this is db hostname (optional)
  • [backupfile.sql] - the file to which the backup should be written/read.

This article was:   Helpful | Not helpful Report an issue

Article ID: 226
Last updated: 08 Feb, 2010
Revision: 1
Views: 5976
Comments: 0
print  Print email  Subscribe share  Share pool  Add to pool comment  Add comment
External links
https://www.kbpublisher.com/kb/client/images/icons/article_out.svg Backing Up and Restoring Your MySQL Database

Prev     Next
Setting Up Folder Permissions in Internet Information Services...       How to change ft_min_word_len variable