How to Restore a Database in cPanel

مدونة AiroServer

How to Restore a Database in cPanel

Sometimes you may need to restore a database in your hosting without wanting to fix all the data on the host. This article will explain how to restore a .sql database in cPanel without restoring the entire hosting account. There are several methods for doing this, which we will cover in detail. Please continue reading for more information.

Restore Database in cPanel

Methods for Restoring a Database Backup in cPanel:

  1. Restoring a Database Backup via the Backup Option in cPanel
  2. Restoring a Database Backup via phpMyAdmin
  3. Restoring a Database Backup via Root Access

Restoring a Database Backup via the Backup Option in cPanel

To restore a .sql backup in the cPanel control panel, you first need to log into cPanel using your shared hosting credentials. Once logged in, select the “Backup” option. As shown in the attached image, you will see various sections where you can either create a full backup of your hosting or restore a specific database.

Server backup icon with cPanel logo for restoring MySQL databases.

To restore a specific database, navigate to the “Restore a MySQL Database Backup” section. Click the “Choose File” button, select your backup file, and click “Upload.”

phpMyAdmin import section showing how to upload and restore a MySQL database backup.

Restoring a Database Backup via phpMyAdmin

To restore a backup through phpMyAdmin, first, log into phpMyAdmin and select the database you wish to restore. Navigate to the “Import” tab, click the “Choose File” button, select your database backup file, and then click “Go.”

MySQL database restoration using the Backup option in cPanel, highlighting the upload button.

Restoring a Backup via Root Access

This method is useful when you have root access to the server. You just need to input the correct database name in the following command:

mysql -p -u username database_name < file.sql

Find More Articles...

Whats New?

arAR