If you ever step yourself in front of a MySQL 5.7, you better hide your head in the sand, if there is no choice and you have to fix it anyways, issue this command on a mysql cli before restoring/executing SQL commands.
SET global sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';