PHP/MariaDB/MySQL

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

Updated January 2026 11,661 views 2 min read
PHP/MySQL | Updated January 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

Share: X in Reddit f Email
  • 655 Users Found This Useful

Was this answer helpful?

Related Articles

Cannot Connect to MySQL on Port 3306

PHP/MariaDB/MySQL | Updated March 2026 If you're getting connection errors when trying to...

Increase PHP Memory

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

How Do I Update or Change My PHP Version

Hosting Control Panel | Updated March 2026 Ultra Web Hosting runs CloudLinux with multiple...

How can I view/modify data in my MySQL database?

PHP/MySQL | Updated January 2026 phpMyAdmin is the primary tool for viewing, editing, and...

What is the Path to ImageMagick?

PHP/MySQL | Updated January 2026 ImageMagick is installed on all Ultra Web Hosting servers...



Save 30% on web hosting - Use coupon code Hosting30