How to export a database (backup with phpMyAdmin)
Download a copy of a MySQL database with phpMyAdmin’s Export tab, choose the right options, and check the backup isn’t empty.
On this page
Quick export
- Open Extra Features › phpMyAdmin.
- Select the database in the left sidebar. Selecting the database, not a table, exports every table.
- Open Export.
- Export method: Quick. Format: SQL.
- Select Export. A
.sqlfile downloads.
Custom export for large databases
Choose Custom to set:
- Compression: gzipped — much smaller and faster to download
- Tables: all, unless you deliberately want a subset
- Object creation options: include Add DROP TABLE if you’ll import over an existing copy
Check the file
- It shouldn’t be 0 bytes or just a few kilobytes for a real site.
- Open an uncompressed
.sqlfile in a text editor: you should seeCREATE TABLEandINSERT INTOlines for your tables.
A silently empty export is a common failure — you only discover it when you need to restore.
Alternatives
- A full DirectAdmin backup includes databases. How to create and download a full account backup
- For WordPress, backup plugins export the database too. How to back up WordPress
Store copies off the server, dated, and keep more than one.
Prefer to follow along?
- Back up WordPress and prove you can restore it
Intermediate · 45 min - Move a WordPress site to Traxio
Intermediate · 60 min - Export a database and import it somewhere else
Intermediate · 25 min
Every Traxio account includes a MySQL database with phpMyAdmin. If you’re still choosing a host, PHP and MySQL hosting is £0.99 a month.
If it doesn’t work
These guides cover the most common problems, starting with what you can see. Or browse every fix for a common problem.
- Database connection failedFix ‘Access denied for user’, ‘Unknown database’ and connection errors in PHP apps by checking prefixes, passwords, privileges and host.
- phpMyAdmin won’t open, logs out or times outFix common phpMyAdmin problems: login loops, session expiry, blank pages, import timeouts and ‘max_input_vars’ warnings.
- “Error establishing a database connection” in WordPressFix WordPress’s database connection error: check wp-config.php credentials, database user permissions, the database host and damaged tables.
Common questions
How do I export or back up a database?
Open the database in phpMyAdmin and use the Export tab — the quick method produces a .sql file you can download and keep. Do this before any upgrade or migration.
Spotted something out of date or unclear? Tell us and we’ll fix it.