sed -r '/INSERT INTO (mdl_table_1|mdl_table_2)
/d' myslqdump.sql | gzip > "db_reduced.sql.gz"
Month: October 2020
Check MySQL table size
SELECT
table_name ASTable
,
round(((data_length + index_length) / 1024 / 1024), 2)Size in MB
FROM information_schema.TABLES
WHERE table_schema = "$DB_NAME";