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.

Guide2 min readLast updated
On this page
  1. Quick export
  2. Custom export for large databases
  3. Check the file
  4. Alternatives
  5. If it doesn’t work
  6. Common questions

Quick export

  1. Open Extra Features › phpMyAdmin.
  2. Select the database in the left sidebar. Selecting the database, not a table, exports every table.
  3. Open Export.
  4. Export method: Quick. Format: SQL.
  5. Select Export. A .sql file 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 .sql file in a text editor: you should see CREATE TABLE and INSERT INTO lines for your tables.

A silently empty export is a common failure — you only discover it when you need to restore.

Alternatives

Store copies off the server, dated, and keep more than one.

Prefer to follow along?

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.

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.

Keep going