Question: How do I import a database? Print

  • GHFS web hosting, GHFS cloud hosting, GHFS Hosting, best hosting provider, shared hosting guide, SSD web hosting, VPS hosting setup, domain and hosting tutorials, how to register a domain, managed hosting services, hosting knowledge base, DNS configuration guide, how to transfer a domain, hosting control panel tutorial, SSL installation guide, email hosting setup, DNS records explained, A record guide, MX record setup, SSL certificate troubleshooting, CNAME configuration, WordPress installation GHFS, WordPress migration guide, optimize WordPress performance, FTP upload guide, fix internal server error, secure VPS server, enable SSH access, MySQL database tutorial, Linux server commands, malware removal guide, DDoS protection GHFS, website security tutorial, PHP configuration guide, secure hosting best practices, firewall configuration VPS, disable root login SSH, VPS hosting tutorial, how to manage Linux VPS, Nginx setup GHFS, Apache configuration guide, install Docker on VPS, cloud server configuration, Python hosting tutorial, Node.js on VPS, Redis installation, hosting troubleshooting guide, MySQL optimization, secure website setup, cPanel tutorial, hosting performance optimization, Plesk tutorial, SSL troubleshooting, email deliverability guide, SMTP configuration guide, server hardening tutorial
  • 0

Answer :

Importing a database is a common task when migrating a website, restoring a backup, or installing an application such as WordPress, Laravel, or custom PHP scripts.

GHFS Hosting makes database imports simple through phpMyAdmin or Plesk Database Manager.


1. Import a Database Using phpMyAdmin (Most Common Method)

Steps:

  1. Log in to your Plesk panel

  2. Go to Websites & Domains

  3. Click Databases

  4. Select the database you want to import into

  5. Click phpMyAdmin

  6. In phpMyAdmin, open the Import tab

  7. Click Choose File

  8. Select your .sql, .zip, or .gz file

  9. Scroll down and click Go

Your database will be imported.


2. Important Notes When Importing via phpMyAdmin

Supported formats:

  • .sql

  • .zip

  • .gz

File size limits:

phpMyAdmin may restrict upload size based on your hosting plan.

If your file is too large, use Plesk Import Tool or SSH + MySQL CLI (VPS).


3. Import a Database Using Plesk Database Manager

Steps:

  1. Go to Plesk → Databases

  2. Select the desired database

  3. Click Import Dump

  4. Choose:

    • Upload a file from your computer

    • Or select a file already on your hosting account

  5. Click OK

Plesk will automatically import the database dump.


4. Import a Large Database (Over phpMyAdmin Limit)

If your .sql file is very large, use one of these methods:

Method A: Use Plesk's “Import Dump” (Preferred for Shared Hosting)

  • No browser upload limit

  • Can import large dumps

Method B: Use SSH + MySQL (VPS Only)

SSH command:

 
 
mysql -u dbusername -p database_name < backup.sql

Or for gzip files:

 
 
gunzip < backup.sql.gz | mysql -u dbusername -p database_name

5. Common Import Errors and Solutions

Error: “#1044 Access Denied”

Cause:

  • Wrong database user

  • User does not have permission

Solution:

  • Check database user credentials in Plesk

  • Make sure the correct user is assigned to the database


Error: “#2006 MySQL Server Has Gone Away”

Cause:

  • File too large

  • Timeout limit reached

Solution:

  • Use Plesk Import Dump or SSH import


Error: “Duplicate Entry”

Cause:

  • Importing the same data twice

Solution:

  • Drop tables before import (only if you intend to overwrite)


Error: SQL mode incompatibilities

Cause:

  • Old MySQL version → New MySQL version mismatch

Solution:

  • Remove outdated SQL statements from the file (GHFS support can assist)


6. When to Contact GHFS Hosting Support

Contact support if:

  • Your import fails repeatedly

  • You receive unclear SQL errors

  • The dump file seems corrupt

  • You do not know which database to import into

  • File size is too large for phpMyAdmin

Support can import your database manually or help fix errors.


Was this answer helpful?

« Back