Importing dumps into Cloud SQL without errors: DEFINER and SUPER (ERROR 1227) on MySQL, extensions and owners on PostgreSQL

MySQL: mysqldump –hex-blob –single-transaction –set-gtid-purged=OFF –default-character-set=utf8mb4; DEFINER clauses for users that do not exist on the instance (or root@localhost) break the import. PostgreSQL: pg_dump –format=plain –no-owner –no-acl plus sed to comment out DROP/CREATE/COMMENT ON EXTENSION. Instance service account with objectAdmin on the bucket; gcloud sql import sql with –database and –user.

September 26, 2026 · 6 min