Posts

Showing posts from May, 2021

如何在 Google Cloud SQL 匯出 binlog

Image
  # mysqlbinlog --base64-output=AUTO --verbose -R -h [CLOUD SQL IP] -u root -p mysql-bin.000199 > /tmp/binlog-dump-000199.sql MySQL 5.6 開始支援 GTID 需要搭配上面的參數才能將 binlog 解析出 SQL 參考來源: Show sql statements from mysql binlog (GTID)