MySQL: changing ROW FORMAT to DYNAMIC or COMPRESSED

If you've changed your database properties to use innodb_large_prefix = 1 and innodb_file_format = Barracuda in my.cnf as below:

you may want to convert all your existing tables to use DYNAMIC or COMPRESSED ROW_FORMAT.

For a single table, you need to run the following:


To convert all tables in a given database, here is a short bash script to do it:

The script assumes you can use mysql without specifying a password (i.e. password added to .my.cnf).

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Lxadm.com.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.