You may occasionally need to export a database from or import a database to your web host. The following procedures explain how to achieve each of these using the phpMyAdmin web application.
How to Export a Database using cPanel
The following procedure explains how to export a database using the phpMyAdmin cPanel component:
- Login to your host’s cPanel interface or equivalent.
- Click on the phpMyAdmin icon.
- On left of screen, select database to export.
- Click the Export tab.
- To export the entire database, select the Quick export method, otherwise click Custom and select the tables you wish to export.
- Set Format to SQL ❯ Click Go ❯ Save the file to your local drive
You now have a dump of the database in SQL format that is appropriate for future import.
How to Import Data into a Database using cPanel
The following procedure explains how to import data into a database using the phpMyAdmin cPanel component:
- Create a SQL file by either exporting the data as explained above or from a third party source.
- If your SQL file is over 2MB in size and is not compressed, compress it using zip.
- If you don’t have a database or or just want the existing tables removed see this article for how to create a database or remove tables.
- Login to your host’s cPanel interface (or equivalent).
- Click phpMyAdmin Icon ❯ Import Tab
- Click on the Choose File button and select the compressed SQL file.
- Ensure SQL is chosen as the format ❯ Click Go
Your data has now been inserted into the database.