How do I backup a database?

Providing you have set up your initialization file properly, all that you would need to do to backup your database is run the following command (on the command-line):

mysqldump myDatabase > myDatabase_backup.sql

This will dump your database as an SQL format into the file myDatabase_backup.sql.


configuration file

When I run mysqldump, I have the options that I need already established in the my.ini configuration file. This means I don't need to specify them at the command prompt, and I can run commands like the one above without the need of specifying various parameter flags (like username and password).

Tags: 

Comments

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.