bguan2020
bguan2020

Reputation: 103

Error when trying to import SQL database to Google Cloud Platform

Import failed: exit status 1 ERROR 1273 (HY000) at line 25: Unknown collation: 'utf8mb4_0900_ai_ci'. Not sure how to solve this problem.

Upvotes: 0

Views: 372

Answers (3)

Lonare
Lonare

Reputation: 4703

Sometimes it is related ANSI_QUOTES enabled on DO.

You can resolve this by going to the settings tab of your DO database, editing "Global SQL modes" and then removing ANSI_QUOTES. After that, reconnect with workbench or TablePlus, and you'll get the expected result.

See image here here is the solution

Upvotes: 0

rendi kuswandi
rendi kuswandi

Reputation: 1

  1. Open a previously imported .sql file
  2. Search: utf8mb4_0900_ai_ci
  3. Replace utf8mb4_0900_ai_ci with utf8mb4_general_ci
  4. Save and retry import

Upvotes: 0

Kunal Deo
Kunal Deo

Reputation: 2308

The issue is the dump collation is not compatible. You may want to take the dump again.

mysqldump -u username -p --compatible=mysql4 database_name > database_name.sql

Upvotes: 1

Related Questions