This worked well for me.
Although it has to be noted that after entering the command
sudo php admin/cli/mysql_compressed_rows.php --showsql
The commands that you have to enter one by one, are shown in a customized way, according to your specific Moodle installation, ie. Database name etc. so they are the commands to have to enter, and not the literal example above.