Use mysqldump to backup MySQL database

One way to backup MySQL database is to use mysqldump which is usually included with the OS.

mysqldump -uroot -p {DB_Name} > backupfile_date.sql

Then you can compress it using gzip:

gzip backupfile_date.sql

Will result in backupfile_date.sql.gz
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Bind MySQL to localhost or certain IP

To bind MySQL server to a certain IP address, such as localhost for local only connections.1....

Use MySQL to import/restore database backup

Using MySQL command line to restore from backup file (ie from mysqldump) is quick and easy. Use...

How To Stop, Start and Restart MySQL

Sometimes you may need to stop, start or restart MySQL via SSH. Follow this guide to do so.  To...

Tracking MySQL Database Import & Export Progress

When performing a mysqldump or importing an SQL file into a MySQL database via SSH, there is no...