What is the proper MariaDB - MySQL import and export format?

PHP/MySQL | Updated 2026

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.

01. Exporting (Backing Up)

In phpMyAdmin (cPanel > Databases > phpMyAdmin):

  1. Select your database from the left sidebar
  2. Click "Export"
  3. Choose "Custom" for full control over settings
  4. Format: SQL
  5. Check "Add DROP TABLE" under "Object creation options" - This makes the export self-contained for clean restores
  6. Compression: gzip for large databases (keeps the file size down)
  7. 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:

  1. Select the target database (it should already exist in cPanel > MySQL Databases)
  2. Click "Import"
  3. Click "Choose File" and select your .sql or .sql.gz file
  4. Character set: utf-8
  5. Format: SQL
  6. Click "Go"

For full import instructions and troubleshooting, see How to Import Into MySQL.

File Size Limits

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 Ticket

Quick Recap

  1. Use SQL format for database exports - not CSV for full backups
  2. Include DROP TABLE statements for clean restores
  3. Use utf8mb4 encoding (especially for WordPress)
  4. Compress large exports with gzip to keep file sizes manageable
  5. 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

  • 655 Users Found This Useful

Was this answer helpful?

Related Articles

phpMyAdmin - Error Incorrect format parameter

PHP/MariaDB/MySQL | Updated March 2026 The "Incorrect format parameter" error in phpMyAdmin...

The MySQL Server Is Currently Offline - DBCACHE Exit 11

Server Maintenance | Updated March 2026 When cPanel displays "The MySQL server is currently...

Increase PHP Memory

PHP/MySQL | Updated 2026 If your website shows a "Fatal error: Allowed memory size exhausted"...

Learn About MySQL

Databases | Updated 2026 MariaDB (the MySQL-compatible database server on Ultra Web Hosting)...

How to Parse HTML as PHP

PHP/MariaDB/MySQL | Updated March 2026 By default, Apache only processes files with a .php...



Save 30% on web hosting - Use coupon code Hosting30