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.

How-to guideBeginner2 min readUpdated

Quick export

  1. Open Extra Features then 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.

Every Traxio account includes a MySQL database with phpMyAdmin. If you’re still choosing a host, PHP and MySQL hosting is free for 30 days, then £0.99 a month.

Popular

Tip: press / to search from any pageSee all results