phpMyAdmin is the free, browser-based tool that comes with cPanel for working directly with your MySQL or MariaDB databases. Most website owners only need it for three jobs: taking a backup (export), restoring or moving a database (import), and fixing damaged tables (repair). This guide covers all three step by step, along with the errors you are most likely to meet.
Opening phpMyAdmin from cPanel
- Log in to cPanel.
- In the Databases section, click phpMyAdmin. It opens in a new tab and logs you in automatically – no separate password needed.
- In the left-hand panel you will see your databases, each starting with your cPanel username prefix, for example
cpuser_blog. Click a database name to see its tables.
Across the top are tabs such as Structure, SQL, Search, Export, Import and Operations. What these tabs act on depends on what you selected on the left: the whole server, one database, or one table. Always check the breadcrumb at the top of the page before you click anything important.
Tip: You cannot create new databases inside phpMyAdmin on cPanel. Create them first in Manage My Databases or the Database Wizard, then come back to phpMyAdmin.
How to export a database (backup)
Exporting creates a .sql file containing all your tables and data. Do this before updating your CMS, installing big plugins, or moving hosts.
Quick export
- Click your database name in the left panel.
- Open the Export tab.
- Leave Export method as Quick and Format as SQL.
- Click Export (or Go in older versions). The file downloads to your computer.
Custom export (for larger sites or migrations)
- On the Export tab, choose Custom.
- Under Tables, keep all tables selected unless you only need some.
- Under Output, set Compression to gzipped. This makes the file much smaller and quicker to download and re-import.
- Under Object creation options, tick Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT / TRIGGER statement if you want the backup to replace existing tables when restored.
- Click Export.
Store backups somewhere safe outside your hosting account, such as your computer or cloud storage. A backup kept only on the same server will not help if the account is lost.
How to import a database (restore or migrate)
Importing runs the SQL file against a database you choose. The target database must already exist in cPanel, and usually it should be empty.
- Create the database and user in cPanel if you have not already.
- Open phpMyAdmin and click the target database in the left panel. This step is essential – importing with no database selected is the most common cause of errors.
- Open the Import tab.
- Click Choose File (or Browse) and select your
.sql,.sql.gzor.zipfile. The maximum upload size is shown beside the button. - Leave Partial import enabled so a slow import can be resumed, and keep Format as SQL.
- Click Import (or Go). Wait for the green success message, which shows how many queries ran.
Replacing an existing database
If the database already has tables, importing over them can cause duplicate errors. To start clean:
- Export a backup of the current data first, just in case.
- Click the database, open the Structure tab, and click Check all.
- From the With selected menu, choose Drop and confirm.
- Now import your file as described above.
Importing large files
If your file is bigger than the upload limit, try compressing it with gzip first. If it is still too large, ask your host to import it for you, use the restore option in cPanel’s Backup tool if you have a full backup, or import it over SSH if your plan includes shell access:
mysql -u cpuser_bloguser -p cpuser_blog < backup.sql
How to check, repair and optimise tables
Tables can become damaged after a server crash, a full disk or an interrupted write. Signs include errors such as “Table is marked as crashed and should be repaired”, or parts of your site suddenly going blank.
- In phpMyAdmin, click the database in the left panel.
- On the Structure tab, tick the tables you want to work on, or click Check all.
- From the With selected drop-down, choose Check table. phpMyAdmin shows a status for each table;
OKmeans no problem was found. - For tables that report errors, select them and choose Repair table.
- Optionally choose Optimize table to reclaim space left behind by deleted data.
The same tasks are available for a single table on its Operations tab, under Table maintenance. cPanel also offers Check Database and Repair Database on the Manage My Databases page, which run on a whole database at once.
A note about InnoDB tables
The repair command only works for table engines such as MyISAM and Aria. Most modern applications, including current WordPress installs, use InnoDB, and for those you will see a message like “The storage engine for the table doesn’t support repair”. InnoDB repairs itself in most cases; if a table is genuinely corrupted, restoring from a backup or asking your host for help is the safer route.
| Task | Where in phpMyAdmin | When to use |
|---|---|---|
| Export | Database > Export | Before updates, migrations, regular backups |
| Import | Database > Import | Restoring a backup, moving a site |
| Check table | Structure > With selected | When you suspect errors |
| Repair table | Structure > With selected | Crashed MyISAM/Aria tables |
| Optimize table | Structure > With selected | After deleting lots of data |
Common problems and fixes
#1044 Access denied for user to database
The SQL file contains a CREATE DATABASE or USE line with a different database name. Open the file in a plain text editor, remove those lines, select the correct database in phpMyAdmin and import again.
#1062 Duplicate entry
You are importing into a database that already has the same data. Drop the existing tables first, as shown above, then import.
#1273 Unknown collation
The file came from a newer MySQL version that uses a collation your server does not support, such as utf8mb4_0900_ai_ci. In a text editor, replace it with utf8mb4_unicode_ci, save and import again.
Import times out or stops
Compress the file, use the Partial import option to resume, or split the file into smaller parts. For very big databases, ask your host.
No tables after import
You probably imported into the wrong database. Check each database in the left panel and repeat the import with the correct one selected.
Frequently asked questions
Is a phpMyAdmin export a full website backup?
No. It only contains the database. Your files, images and emails need to be backed up separately, for example with cPanel’s Backup tool or by compressing folders in File Manager.
Can I edit data directly in phpMyAdmin?
Yes, you can browse a table and edit rows, but be careful. A wrong change can break your site, so export a backup first.
How often should I export my database?
It depends on how often your site changes. A busy shop or blog may need daily backups, while a small brochure site can manage with fewer. Always take one before any major change.
Why does phpMyAdmin show databases I did not create?
You may see information_schema, a built-in system view. It is read-only and safe to ignore.
Conclusion
phpMyAdmin in cPanel makes database care simple: export a backup before every big change, import carefully into the correct empty database, and use Check and Repair when tables misbehave. Keep copies of your exports off the server, learn the few common error codes above, and you will be able to protect and restore your website’s data with confidence.



