There are a number of ways to back up your MySQL database. We recommend backing up your databases regularly, especially if you are upgrading software that accesses the database.
You can quickly get a backup of your database through the eXtend Control Panel MySQL Database page.
To get a backup:
You can use phpMyAdmin to download a backup of your database by using ‘Export’.
If you have SSH access to your account, you can download a backup of your MySQL database to the current directory you are in.
To create the backup:
mysqldump -h servername -u username -p --add-drop-table --create-options --skip-add-locks -e --set-charset --disable-keys -Q databasename > databasedump.sql
Where servername is your server’s name, username is your user name, and databasename is the database’s name. You can name the backup anything as long as .sql is at the end.
To backup and compress the 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
MySQL offers the MySQL Workbench, a piece of free software that allows you to manage, backup, and restore MySQL databases. The software also comes packaged with the MySQL Query Browser.
To download and find out more about MySQL Workbench, please visit the MySQL site: http://dev.mysql.com/downloads/workbench/
Article ID: 5
Created On: Thu, Feb 26, 2015 at 4:43 PM
Last Updated On: Wed, Aug 18, 2021 at 11:11 AM
Online URL: https://www.heartinternet.uk/support/article/how-do-i-back-up-my-mysql-database.html