Skip to content

Instantly share code, notes, and snippets.

@gquittet
Created June 12, 2025 08:59
Show Gist options
  • Save gquittet/7f2cb57b42b79ea5581bd37bf7eff323 to your computer and use it in GitHub Desktop.
Save gquittet/7f2cb57b42b79ea5581bd37bf7eff323 to your computer and use it in GitHub Desktop.

Convert it to readable text file

mysqlbinlog -vv --base64-output=decode-rows binlog.190611 > binlog.190611.txt

Count occurences of database modifications

cat binlog.190611.txt |grep -i  'update\|insert\|delete\|replace\|alter' | tr ‘[A-Z]’ ‘[a-z]’|sed -e '/*/d' | sort | uniq -c | sort -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment