[GCP] Can not use pt-online-schema-change on Google CloudSQL.

Percona 的 pt-online-schema-change 運作原理不多解釋
但這邊會說為什麼無法使用
Reason: Without SUPER privilege
把 pt-online-schema-change 的工作原理拆成 SQL Comment 後
建立 Trigger 時就會發現的錯誤訊息

mysql> CREATE TRIGGER `pt_osc_test_online_table_del` AFTER DELETE ON
`test`.`task` FOR EACH ROW DELETE IGNORE FROM `test`.`task_tmp` WHERE
`test`.`task_tmp`.`id` <=> OLD.`id`;
ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging
is enabled (you *might* want to use the less safe
log_bin_trust_function_creators variable)

相較於 AWS RDS 支援度就差了一些
目前在 CloudSQL 的 DB 如果要 ALTER Schema 的話,也只能 online 硬上了

Ref: https://blog.wnlin.org


等 Best Practices 出現了

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *