You are here:

Knowledgebase

Did you know that we are one of the cheapest domain registrars in the UK Find out more...

Portal Home > Knowledgebase > Databases > How do I backup my Mysql database?


How do I backup my 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 eXtend Control Panel and click on Web Tools. Click to configure MySQL Databases and click 'Now' under backup database. Save this file to your local machine.

(2) Using phpMyAdmin

Log into your hosting 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 todownload 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. 



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read

Language:

Testimonials

Fantastic support from polite staff - 10 stars!