MySQL is one of the most popular relational database management software applications. It is used by millions of webmasters to run dynamic websites. Also, most Content Management systems rely on MySQL to store information (e.g. WordPress and OpenCart).
A database backup is very essential in a production environment whether it's a software or a website. Luckily if your web host supports cPanel, you can create and restore MySQL backups directly from it and this forms the basis of this guide.
- A domain name e.g. www.example.com
- A web hosting account that supports cPanel
- cPanel username and password.
Special note: consult HostAdvice's best MySQL hosting page to find the leading web hosts in this category, including expert as well as user reviews.
Step 1: Log to your cPanel Account
Visit your cPanel account from your browser by entering the below text on your browser:
Remember to replace ‘example.com’ with the primary domain associated with your cPanel account. You browser will then display the below login page. Enter your username and password to proceed:
Step 2: Search the Backup Feature
Next, you need to search the backup feature by typing the word ‘Backup’ on the search box. Then click on the backup icon to proceed as shown below:
Step 3: Locate your database under the list of databases
Next, you will need to locate your database under a list of databases on the next screen. You will find this slightly above the bottom of the screen. Just click the database that you want to backup as shown below:
You will be prompted to save your database on your computer. You can edit the name of the file or leave it intact as shown below:
Step 4: Restoring the database
To restore your MySQL database, find the title, ‘Restore a MySQL Database Backup’ under ‘Account Backups’, then click ‘Choose File’ and ‘Upload’ as shown below
Your database will be successfully restored if there were no errors:
That’s when it comes to creating and restoring MySQL database backups. To be on the safe side, you can append, the date and time when you save a MySQL backup file so that you can easily identify your backups chronologically from your computer (e.g. you can have a file name like ‘2018-05-29-19-59-HRS_test_database.sql’).
Also, MySQL databases backups should be kept securely because somebody can upload them to a server to read their contents. Also, It is always advisable to keep an off-site backup of your website and the cPanel MySQL backup feature makes this possible.
If you have followed the guide from the beginning, backing up your website/application database will easy and fast. I hope this was a resourceful article worth reading.