Why MySQL Database is Bigger After Dump/Import?

The first thing that caught my eye was the versions of MySQL you are using.

You said

  • The source DB is version 5.5.47
  • The receiving DB is version 5.7.13

These two versions of MySQL use different default values for innodb_file_format

  • MySQL 5.5 has Antelope as the default
  • MySQL 5.7 has Barracuda as the default

MySQL 5.7 has new ways of storing InnoDB as mentioned in the Documentation. Please note:

The Barracuda file format is required to use Compressed or Dynamic row formats and associated features such as compression, off-page storage for large variable-length columns, and large index key prefixes (see innodb_large_prefix). This restriction does not apply to tables stored in general tablespaces.

If your data has large variable-length columns, the result of reloading could be the storage of data and index info outside of your BTree Indexes and extra splitting of pages. See DYNAMIC and COMPRESSED Row Formats for more details on this. Many of the new InnoDB file format features are deprecated in MySQL 5.7 and will eventually disappear in future releases.

SUGGESTION #1

Even though deprecated, you could set innodb_file_format to Antelope on the MySQL 5.7 server, restart MySQL, and reload the mysqldump.

SUGGESTION #2

Use MySQL 5.5/5.6 as the Master instead of MySQL 5.7. Restart MySQL on the Master, and reload mysqldump into the Master.

SUGGESTION #3

Run ALTER TABLE innodbtable ROW_FORMAT=COMPRESSED; on all the MySQL 5.7 InnoDB tables.

GIVE IT A TRY !!!