phpMyAdmin’s Export tab opens with two big radio buttons — Quick and Custom — and a wall of checkboxes hiding behind the second one. Most “my import doesn’t work” tickets we see started life as a Quick export, where phpMyAdmin guessed at a format and the destination MySQL version disagreed with one of the defaults. The Custom dialog is intimidating but only six of its options matter, and getting them right once means every future export from that account restores on the first try.
What’s happening
A Quick export from a cPanel phpMyAdmin produces SQL with DROP TABLE IF EXISTS, no triggers, no events, no routines, and a character set that matches whatever the connection negotiated rather than what the table actually stores. If the source has triggers or stored procedures, they are silently dropped. If the source is utf8mb4 and the connection lands in utf8, four-byte characters get mangled — most visibly, emoji in user-generated content. And if the destination MySQL is older than the source MariaDB, the dump may contain DEFINER= clauses that fail because the defining user doesn’t exist on the target.
How to verify
Before you trust an export, check that it round-trips on a scratch database:
mysql -e "CREATE DATABASE acmecorp_test"
mysql acmecorp_test < export.sql
mysql -e "SHOW TABLES" acmecorp_test
diff <(mysql -e "SELECT COUNT(*) FROM acmecorp_wp.wp_posts") <(mysql -e "SELECT COUNT(*) FROM acmecorp_test.wp_posts")
Row counts matching is the minimum. Then spot-check a row with multibyte content (a comment with an apostrophe, a post with an emoji) to confirm the encoding survived. If wp_posts has triggers or the schema includes stored functions, SHOW TRIGGERS and SHOW PROCEDURE STATUS on the test database should match the source.
The fix
- Use Custom, not Quick. The Quick defaults are tuned for a single use case (back up locally and restore on the same machine) and lie about everything else.
- Format: SQL. CSV is for analysis tools, not for restoring a working application.
- Compression: gzipped, always. A 400MB dump compresses to 30–60MB and downloads in a fraction of the time. phpMyAdmin handles
.sql.gznatively on import. - In “Object creation options”: enable
DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT / TRIGGERif you want the restore to overwrite. DisableAdd DROP DATABASEunless you actually want to obliterate the destination. EnableCREATE PROCEDURE / FUNCTION / EVENT / TRIGGER— these are off by default in Quick, which is how you lose your scheduled jobs. - In “Data dump options”: set
Syntax to use when inserting datatoINSERT IGNOREfor migrations where the destination may already have partial data, orINSERTfor a clean restore. SetMaximal length of created queryto50000— the default of50000is fine for most schemas, but if you have BLOB columns, raise to1000000to avoid an INSERT per row. - Remove DEFINER clauses on cross-server migrations: in the SQL section, set
Database system or older MySQL serverto your destination’s version. Or runsed -i 's/DEFINER=[^]*@[^]*//g' export.sqlafter download — this strips the DEFINER and lets the routines belong to whoever runs the import. - For utf8mb4 sources, ensure the export connection is set to
utf8mb4before exporting. The cPanel phpMyAdmin connection collation defaults toutf8_general_ci, which silently downcasts. Set it in the top-right dropdown before opening the Export tab.
For accounts where database migrations happen often and the export needs to be reproducible, Stack Harbor’s environment management workflow uses scripted mysqldump with the same flags every time and reserves phpMyAdmin for spot-checking, not export.