When importing or exporting MariaDB/MySQL databases, the format matters. An incorrect format can cause import failures, data corruption, or encoding issues. Here are the correct formats and settings for database operations on your hosting account.
Use SQL format with UTF-8 encoding
When exporting from phpMyAdmin, use "SQL" as the format and "utf8" (or "utf8mb4" for WordPress) as the character set. This produces a .sql file containing CREATE TABLE statements and INSERT statements that can be imported cleanly on any MySQL/MariaDB server.
01. Exporting (Backing Up)
In phpMyAdmin (cPanel > Databases > phpMyAdmin):
- Select your database from the left sidebar
- Click "Export"
- Choose "Custom" for full control over settings
- Format: SQL
- Check "Add DROP TABLE" under "Object creation options" - This makes the export self-contained for clean restores
- Compression: gzip for large databases (keeps the file size down)
- Click "Go"
The resulting .sql (or .sql.gz) file is your backup. Store it somewhere safe.
For alternative backup methods including SSH and automated backups, see How to Backup a MySQL Database.
02. Importing (Restoring)
In phpMyAdmin:
- Select the target database (it should already exist in cPanel > MySQL Databases)
- Click "Import"
- Click "Choose File" and select your
.sqlor.sql.gzfile - Character set: utf-8
- Format: SQL
- Click "Go"
For full import instructions and troubleshooting, see How to Import Into MySQL.
phpMyAdmin has an upload limit (typically 128MB on our servers). If your database dump is larger than this, use SSH instead: mysql -u dbuser -p dbname < backup.sql. Or split the file into smaller chunks using a tool like BigDump.
03. CSV Format
CSV (Comma-Separated Values) is useful for importing data from spreadsheets into a database table, but it is not a good format for full database backups because it does not include table structure, indexes, or relationships.
To import CSV data into a specific table in phpMyAdmin: select the table, click "Import," choose CSV format, and map the columns. This appends data to the existing table.
04. Character Encoding
Encoding mismatches are one of the most common causes of garbled text after an import. Tips:
- WordPress uses utf8mb4 - Make sure both export and import use utf8mb4, not just utf8. utf8mb4 supports emoji and 4-byte characters.
- Match the source encoding - If the original database was created with latin1, export it as latin1 and convert during import, or use a tool that handles the conversion.
- Check after import - If you see characters like
éinstead ofé, there is an encoding mismatch. Re-import with the correct character set.
Import/Export Trouble?
If your import is failing or you see corrupted characters after a restore, open a ticket with the error message and we will help.
Open a Support TicketQuick Recap
- Use SQL format for database exports - not CSV for full backups
- Include DROP TABLE statements for clean restores
- Use utf8mb4 encoding (especially for WordPress)
- Compress large exports with gzip to keep file sizes manageable
- Use SSH for files over 128MB that exceed phpMyAdmin's upload limit
Database management best practices · Last updated March 2026 · Browse all PHP/MySQL articles
