How to restore the database in C Panel and server

It is always recommended to make a backup of the database and keep a copy of it in a safe and reliable place to maintain the security of website information. When our website is disrupted, we can fix the problem in most cases through a healthy database restorer. Professional web admins always keep copies of their site database on a local or other server and use it to transfer the site to the host or restore the nutritional information of a hacked or hacked site. Therefore, paying attention to this case and getting acquainted with how to restore database backups is an important issue for the webmaster of the site.

Database restores training in C Panel and Server.

There are three methods for restoring information in the database. You can choose and implement one of the following methods, each of which is fully explained below:

  • Using Backup & Restore from the site
  • Using phpMyAdmin
  • Using command/command line

Database restores using Backup & Restore from the site:

  1. Log in to Cpanel.
  2. Select the Backup tool.
  3. From the Restore, click a MySQL Database Backup section, click the Browse button, select the desired SQL file, then click the upload button.
  4. The database will then be restored.


Database restore using phpMyAdmin :

  1. Log in to phpMyAdmin.
  2. Select the database you want.
  3. Select the Import tab.
  4. Click Browse and select the database file you want.
  5. Click Go to perform the import operation.


Restore the database using commands / Command Line :

To use this method, you need to use the SSH syntax environment. The required command is as follows:

mysql -p -u username database_name < file.sql 

Note: You must enter the database password immediately. Then a copy of the database will be extracted into the desired file.

After importing the database in PHPMyAdmin, you will be able to view your site information well by connecting the database name and username to your site, and by entering PHPMyAdmin, you will be able to view or edit the imported database tables.