redhippo Help Centre

Home > Databases > How do I backup MySQL database?
Home > Databases > How do I backup MySQL database?
Posted in

How do I backup MySQL database?

Backing up your MySQL Database can be done in several ways:

1. Using the backup tool from the Web Tools section.
2. Using phpMyAdmin web interface.
3. Using command line through shell access.
4. Using MySQL Workbench.

(1) Using our backup tool

Log into your maXpanel Control Panel and click on Web Tools. Click to configure MySQL Databases and click ‘Now’ under backup database. Save thisfile to your local machine.

(2) Using phpMyAdmin

Log into your maXpanel Control Panel and click on “MySQL Databases“. Click on the “Manage” button for the database that you wish to back up, this will start PhpMyAdmin. From here, go to the “Export” page, then complete the following steps:

1. Select all tables.
2. Select “Structure and data“.
3. Select “Add drop table” .
4. Select “Enclose table and field names with backquotes” .
5. Select “Save as file“.
6. Click the “Go” button.

You will be prompted to save the dump file on your computer.

(3) Using MySQL command line tools

To use MySQL command line tools, you will need SSH access to be enabled on your hosting account. You can perform backup using the following command:

mysqldump -h servername -u username -p –add-drop-table –create-options –skip-add-locks -e –set-charset –disable-keys -Q databasename > databasedump.sql

To backup and compress your dump file:

mysqldump -h servername -u username -p –add-drop-table –create-options -e –set-charset –skip-add-locks –disable-keys -Q databasename | gzip > databasedump.sql.gz

The commands above will create the dump file in your current directory. You can download this backup file using scp or ftp for your archival purposes. If you perform this command in the public_html directory (or if you move the file into the public_html directory), you will be able to download this file from the web.

(4) You can download MySQL Workbench

From http://wb.mysql.com/ – this will allow you to connect to the MySQL process on the server directly and create a local backup of the data.

I'd like to hear your comments or questions?

Grow your business with a beautiful new

Website!

Website Package