[SSH1.02] 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 Hosting cPanel v7.5 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 cPanel v7.5 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.

Was this answer helpful?

 Print this Article

Also Read

[SSH1.04] How do I access the raw web access or error logs?

Simply log into your Hosting cPanel v7.5 Control Panel and click on 'Log File Download' in the...

[SSH1.01] How do I use an SSH client instead of telnet on my account?

The SSH Secure Shell (SSH client) is a program that allows secure network services over an...

[SSH1.03] How do I connect to MySQL via SSH (telnet)?

You can connect to the server using SSH Telnet, once logged into the system you can access MySQL...

[SSH1.05] Can I have access as root to the server?

As the servers that provide shared hosting accounts are shared between several customers, we're...