How can I change the table collation in an entire (large) .sql file?

How can I change the table collation in an entire (large) .sql file?

Answer:

In order to fix the "Unknown collation: 'utf8mb4_0900_ai_ci'" bug:


sed -i 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g' myfile.sql