Data guides
MySQL: see how much data you have, then export it.
Pick a system to see two things: how to check how much data is in it, and how to export a copy. No form, no sign-in.
MySQL
Data, dev & IT
How to see how much data is in MySQL
- Connect to the server with the mysql client or an admin tool
- Query information_schema.TABLES and sum DATA_LENGTH + INDEX_LENGTH grouped by TABLE_SCHEMA
- Note the size of each database
- Add up the databases you need to keep
Record data plus index size; the figures are estimates for InnoDB, and binary logs and backups are separate.
How to get a copy of your MySQL data
- Get a database user with SELECT, SHOW VIEW, TRIGGER and LOCK TABLES rights
- Open a terminal on a computer with MySQL client tools
- Run mysqldump --single-transaction --all-databases > backup.sql
- Check that the file finished without errors
- Store the file somewhere secure
Someone with database access runs mysqldump to export one or more databases as SQL statements. With options it can also write CSV or other delimited text.
For a consistent copy of a live InnoDB database, use the --single-transaction option. Without it, tables may be locked during the dump.
These instructions are written by DataFrenzy from each vendor’s public help pages. Menu names can vary by plan and change over time; the official link on each guide is the final word. Screenshots come from each vendor’s own help pages and videos or, where noted, from third-party tutorials credited under the image; dashed outlines are illustrations, not screenshots. Looking up a size or preparing an export never sends anything to DataFrenzy.