> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://krystal-dev.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to import a database using phpMyAdmin

This article will show you how you can import a database from a file on your local computer to your Krystal cPanel account. This article assumes that you are already successfully logged into cPanel.

We have a separate article on [importing large databases](/article/aqggjesji5-how-to-import-a-large-database-into-my-sql) which may time-out or error when importing through phpMyAdmin.

1.  Before you can import a database dump file from your computer, a destination database must already exist within your cPanel account. Please see the article [How to create MySQL databases in cPanel](/cpanel/how-to-create-a-my-sql-database-and-users).
2.  ![](https://storage.crisp.chat/users/helpdesk/website/4027250918c3d400/fb41a53b-c7ee-493a-afb9-0ca07a_15thuu0.png)
    
    Open the phpMyAdmin web application by clicking on the phpMyAdmin icon in the Databases section of cPanel.
3.  Once phpMyAdmin opens, you will see down the left margin a list of databases to which you have access. information_schema is a special database that holds information "about" your databases - you do not need to access this.  
    Click on the name of the database you want to import your data into - in the below case, krystald_testing.
    
    ![](https://storage.crisp.chat/users/helpdesk/website/559a62ac5bb91c00/f788e928-c06e-41a7-8748-a0410f_197jels.png)
    
4.  Click on the **Import** tab to view the Import settings.
    
    ![](https://storage.crisp.chat/users/helpdesk/website/e68c6be8b9d1b000/6c268a22-187c-489c-b3c4-228d14_16m58kx.png)
    
5.  Click the **Choose File** button and browse your computer for your MySQL dump file (usually named *.sql)  
    That's it - the default options will normally work fine for you. Just click the Go button!
    
    ![](https://storage.crisp.chat/users/helpdesk/website/bf86c22125e84000/46a96e94-6603-48bd-99e3-d5a9ca_1rwv1jd.png)
    
6.  A common error that occurs looks like the one shown below. This is because your database dump file contained instructions to create a specific database name. This is not allowed, because we are importing data into a known (predefined) database. To prevent this error recurring you must comment out or remove the lines that are highlighted (in this case, remove the line that reads CREATE DATABASE etc..)
    
    ![](https://storage.crisp.chat/users/helpdesk/website/d80e083bcfedd000/8fa71bc3-4aa8-42d3-a488-a69e7f_1ubro11.png)
    

* * *

* * *