How to find and export your MySQL data.
MySQL reports table sizes in the information_schema.TABLES view, which you can query with any SQL client. Sum DATA_LENGTH and INDEX_LENGTH across your application schemas and report the total in GB.
Where MySQL shows how much you have.
- Connect with the mysql client as a user with SELECT access to every application schema.
- Run:
SELECT table_schema, ROUND(SUM(data_length + index_length) / POW(1024,3), 2) AS size_gb, SUM(table_rows) AS approx_rows FROM information_schema.TABLES WHERE table_schema NOT IN ('mysql','information_schema','performance_schema','sys') GROUP BY table_schema ORDER BY size_gb DESC; - These statistics are cached for 24 hours by default. For fresh numbers, run
SET SESSION information_schema_stats_expiry = 0;before the query, or ANALYZE TABLE on your largest tables. - For exact row counts, run
SELECT COUNT(*)on your main tables. For InnoDB, TABLE_ROWS is a rough estimate that can be off by 40 to 50 percent.
Plan and role. Works on any MySQL edition with no special plan. Use an account that can see all application schemas so no tables are missed.
What to report on the Polyshares intake.
Report MySQL in GB. The intake also asks how many years the company has used it and how many seats it has.
On the Polyshares intake, report the summed DATA_LENGTH plus INDEX_LENGTH in GB. For InnoDB these are allocated pages for the clustered index and secondary indexes, so the number is larger than the raw rows and larger than a dump file. Count the primary server only, not replicas or binary logs. For years in use, take the earliest created timestamp in your core tables; for seats, count the application users or accounts the database serves.
Export the full history.
- Run the dump against a replica if you have one. For InnoDB tables, take a consistent dump without locking:
mysqldump --single-transaction --routines --triggers --events --databases app_db > app_db.sql - For large databases, MySQL recommends the MySQL Shell dump utilities, which run in parallel and compress output. In MySQL Shell, run
util.dumpInstance('/backup/full-dump')orutil.dumpSchemas(['app_db'], '/backup/app-dump').
mysqldump writes SQL statements, or delimited text with --tab. It can be slow on large data sets, and restoring replays every row. --single-transaction gives a consistent snapshot only for InnoDB tables; without it mysqldump needs the LOCK TABLES privilege. MySQL Shell's util.dumpInstance writes zstd-compressed, tab-separated chunks with 4 threads by default, and its consistency guarantee also covers InnoDB tables only.
The intake only needs the size, so you do not have to run an export to fill it in. You also do not need to clean or scrub an export. Polyshares handles anonymization before anything moves.
Why MySQL data has value for AI training.
MySQL backs a large share of web and SaaS applications, so its tables often hold the business's full transaction history: signups, orders, invoices and support events tied together by keys and timestamps. That linked history of real operations is what makes the data useful for model training.
What stays private.
You can dump only the application databases you name, so the mysql system schema, user accounts and any payment tables stay out of the export.
We anonymize identifying details before anything moves. Polyshares does that work, so your team does not have to scrub records first.
Your company keeps ownership of its data. The license is bounded to defined material and a defined use.
Polyshares is the buyer and pays your company directly. There is no fee or commission, and Polyshares reviews the record before it makes any offer.
Common questions about MySQL data.
Why does information_schema show a different size than my mysqldump file?
DATA_LENGTH and INDEX_LENGTH count allocated InnoDB pages, including indexes. A mysqldump file holds row data as SQL text plus index definitions, so the two rarely match. Report the information_schema figure.
Is TABLE_ROWS an exact row count?
Not for InnoDB. MySQL documents that it can differ from the real count by as much as 40 to 50 percent. Use SELECT COUNT(*) when you need an exact number.
Will mysqldump lock my tables?
With --single-transaction on InnoDB tables it reads from a consistent snapshot without locking. Without that option, or for non-transactional tables, it locks tables while it dumps them.
Source: MySQL 8.4 Reference Manual: The INFORMATION_SCHEMA TABLES Table, MySQL 8.4 Reference Manual: mysqldump, MySQL Shell 8.4: Instance and schema dump utilities. Checked September 2026.
Related
- PostgreSQLDatabase and table sizes from SQL, full export with pg_dump and pg_dumpall
- BigQueryTABLE_STORAGE logical bytes for size, EXPORT DATA or bq extract to Cloud Storage
- SnowflakeCost management and TABLE_STORAGE_METRICS for size, COPY INTO a stage to export
- Amazon S3Storage Lens and BucketSizeBytes for size, aws s3 sync or Batch Operations to export
- Amazon RedshiftSVV_TABLE_INFO size in 1 MB blocks, UNLOAD to Amazon S3 as Parquet
- DatabricksDESCRIBE DETAIL sizeInBytes per Delta table, export by cloning to your cloud storage
- MongoDBdb.stats() dataSize versus storageSize, full export with mongodump
- Amazon DynamoDBItem count and table size per table, export to Amazon S3 with PITR turned on
- All data source guidesEvery system on the Polyshares intake, grouped by category.
Put your numbers on the intake.
List your systems, their sizes and your headcount in one intake. Polyshares reviews the record and prices it. There is no fee or commission to your company.
Check your data