Data source guides

How to export your MySQL data

Last checked 28 September 2026

Answer

An account with SELECT on the dumped tables, SHOW VIEW on views, TRIGGER on triggers and PROCESS runs mysqldump --all-databases, which writes every database on the server as one SQL file of CREATE TABLE and INSERT statements. Adding --single-transaction issues a BEGIN before the dump, gives InnoDB a consistent snapshot and removes the need for the LOCK TABLES privilege. The same tool writes tab separated text with --tab and XML with --xml.

What it holds

Application tables and their rows, views, triggers and stored routines.

Find the size

MySQL shows no storage figure in a console. Query INFORMATION_SCHEMA.TABLES and sum DATA_LENGTH plus INDEX_LENGTH per schema for bytes on disk. TABLE_ROWS is exact on MyISAM, but MySQL states it is an approximation on InnoDB that can be 40 to 50 percent out, so use SELECT COUNT(*) where the row count has to be right. Those statistics are cached for information_schema_stats_expiry seconds, 86400 by default, and ANALYZE TABLE refreshes them.

What to enter on the form

MySQL in GB, and the year your company started using it. Seller form

Sources