---
title: How to Import or Export a MySQL Database with phpMyAdmin
description: "**In short:** To import: cPanel, then phpMyAdmin, choose the database, click Import, choose your .sql file and click Go. To export: choose the database or table, click Export and Go to download an SQL file. Create the database first before…"
url: "https://www.hyyat.com/en/knowledgebase/import-export-mysql-database-phpmyadmin/"
updated: "2026-09-29"
category: Website control panel ( cpanel )
---

# How to Import or Export a MySQL Database with phpMyAdmin

**In short:** To import: cPanel, then phpMyAdmin, choose the database, click Import, choose your .sql file and click Go. To export: choose the database or table, click Export and Go to download an SQL file. Create the database first before importing.

Before importing, create the database and assign a user to it. See [how to create a database and assign a user](https://www.hyyat.com/en/knowledgebase/create-mysql-database-cpanel/).

## A) Import a database with phpMyAdmin

**1.** Log in to cPanel.

**2.** In the **Databases** section click **phpMyAdmin**.

![phpMyAdmin in cPanel](https://www.hyyat.com/wp-content/uploads/2019/02/phpmyadmin1.png)

**3.** phpMyAdmin opens. Select your database from the list on the left.

![Select the database in phpMyAdmin](https://www.hyyat.com/wp-content/uploads/2019/02/dpimpext2.png)

**4.** Click **Import**.

![Import tab in phpMyAdmin](https://www.hyyat.com/wp-content/uploads/2019/02/dpimpext3.png)

**5.** Choose the database file you want to upload.

![Choose the SQL file](https://www.hyyat.com/wp-content/uploads/2019/02/dpimpext4.png)

**6.** Click **Go** to upload and import it.

![Import finished](https://www.hyyat.com/wp-content/uploads/2019/02/dpimpext5.png)

For very large files, compress the SQL file (.zip or .gz) before uploading, or ask our support to import it for you.

## B) Export a database with phpMyAdmin

**1.** Log in to cPanel and open **phpMyAdmin** from the Databases section.

**2.** Select the database or table you want to export.

![Select the database to export](https://www.hyyat.com/wp-content/uploads/2019/02/dpimpext7.png)

**3.** Click **Export**.

![Export tab in phpMyAdmin](https://www.hyyat.com/wp-content/uploads/2019/02/dpimpext8.png)

**4.** Click **Go** to download the SQL file.

![Download the SQL export](https://www.hyyat.com/wp-content/uploads/2019/02/dpimpext9.png)

**Note:** the **Custom** export method lets you change many output settings, and the Format option lets you export as CSV, PDF, LaTeX and more. In most cases the default Quick method with SQL format is all you need.

**Related service:** [Hyyat Host shared hosting](https://www.hyyat.com/en/shared-hosting-2/) includes cPanel, phpMyAdmin and unlimited databases on most plans, with 24/7 support.

 **Need this service from Hyyat Host?**Our team handles it for you, with support replying to tickets within 24 hours at most.[Web Hosting](https://www.hyyat.com/en/hosting/)[Saudi Hosting](https://www.hyyat.com/en/saudi-hosting/)
