How to Restore a MySQL Database Backup in cPanel?


If your website's database becomes corrupted, accidentally deleted, or needs to be moved, restoring from a backup is essential. SKPHost allows you to restore MySQL databases directly from cPanel using multiple methods.

Method 1: Restore via cPanel Backup Tool

  1. Login to cPanel.
  2. Under Files, click Backup.
  3. Scroll to Restore a MySQL Database Backup.
  4. Click Choose File and select your .sql or .sql.gz backup file.
  5. Click Upload.

Method 2: Restore via phpMyAdmin

  1. Go to cPanel → phpMyAdmin.
  2. Select the target database from the left panel.
  3. Click the Import tab.
  4. Click Choose File and select your .sql file.
  5. Click Go.

Method 3: Restore via SSH

# Import SQL file via command line
mysql -u username -p database_name < backup.sql

# Import compressed .sql.gz file
gunzip < backup.sql.gz | mysql -u username -p database_name

Warning: Restoring a database overwrites all existing data. Make sure you have a current backup of the live database before restoring an older version.

Finding Your Database Credentials

Your database name, username, and password can usually be found in your CMS configuration file (e.g., wp-config.php for WordPress).

If you continue to face issues, please open a create a request.

Je li Vam ovaj odgovor pomogao? 0 Korisnici koji smatraju članak korisnim (0 Glasovi)