How to backup your MySQL Database to a file – how to create mysql dump file

How to backup your MySQL Database to a file – how to create mysql dump file

Backing up your database is a very important system administration task, and should generally be run from a cron job at scheduled intervals. We will use the mysqldump utility included with mysql to dump the contents of the database to a text file that can be easily re-imported.

Syntax:

mysqldump -h localhost -u root -pmypassword databasename > dumpfile.sql

Example:

mysqldump -h localhost -u root -p2Uad7as9 database01 > dumpfile.sql

WHERE:
– “2Uad7as9″ is the password for your root mysql user;
– “database01″ is the name of the mysql database that you want to backup;
– “dumpfile.sql” is the name of the mysql dump/backup file that you want to create.


If you’re one of our Linux VPS Hosting customers we can help you to backup your MySQL Database to a file i.e. create mysql dump file for you on your virtual server free of charge. Just contact us and some of our experts will complete your request immediately.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>