Importing a Database Using phpMyAdmin (Firstserv Guide)

This guide explains how to import a database backup (usually a .sql file) from your computer into your Firstserv hosting account using phpMyAdmin in cPanel.


Before You Start

Before importing your database:

  • ✅ You must already have a database created in cPanel
  • ✅ You must know which database you want to import into
  • ✅ Your backup file should typically be in .sql format

👉 If you haven’t created a database yet, do this first in:

cPanel → MySQL Databases

Step 1: Open phpMyAdmin

  1. Log in to cPanel
  2. Go to:
    Databases → phpMyAdmin
    

Step 2: Select Your Database

  • In the left-hand panel, click the database you want to import into

✅ Ignore:

information_schema

(This is a system database and not used for your site data)


Step 3: Open the Import Tool

  • Click the Import tab at the top of the page

Step 4: Upload Your Database File

  1. Click Choose File
  2. Select your .sql file from your computer

Step 5: Start the Import

  • Leave the default settings (these are suitable in most cases)
  • Click Go

✅ phpMyAdmin will now import your database


After Importing

  • Once complete, your database tables should appear in phpMyAdmin
  • You can now connect your website or application to this database

Common Issue & Fix

❌ Error: “CREATE DATABASE not allowed”

This happens when your .sql file contains commands like:

 
 
 
 
 
 
SQL
 
 
CREATE DATABASE dbname;
USE dbname;
 
 

✅ How to Fix

  • Open the .sql file in a text editor
  • Remove or comment out these lines

Example:

 
 
 
 
 
 
SQL
 
 
-- CREATE DATABASE dbname;
-- USE dbname;
 
 

Then re-import the file.


Large Database Warning

If your import:

  • Fails
  • Times out
  • Or is very large

👉 You should instead use:

  • SSH import method (recommended for large files)

Summary

  • Create your database first in cPanel
  • Open phpMyAdmin
  • Select the database
  • Use the Import tab to upload your .sql file
  • Remove invalid database creation commands if needed

Need Help?

If your database won’t import or you’re unsure which method to use, the Firstserv support team is always happy to help.

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Managing Disk Usage in cPanel

Managing Disk Usage in cPanel (Firstserv Guide) Running low on storage can be stressful—but...

Get a free Let's Encrypt SSL for your website

An SSL (Secure Sockets Layer) certificate ensures that the connection between your website...

Importing Large MySQL Databases

Importing Large MySQL Databases (Firstserv Guide) If your database is too large to...

What happens if I exceed my disk space allowance?

Disk Space & Mailbox Usage (Firstserv Guide) Managing your disk space is essential to...

Backing Up Databases via SSH

Backing Up Databases via SSH (Firstserv Guide) This guide explains how to create MySQL...