How do I fix «ERROR at line 1: Unknown command '\-'» on importing a MySQL dump back to a database?

2024-08-04--03-38-39

Method 1 (faster to execute)

grep -v '!999999\\- enable the sandbox mode' dump.sql > temp && mv temp dump.sql

Method 2 (shorter to write)

sed -i '/!999999\\- enable the sandbox mode/d' dump.sql