Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tailing MariaDB database changes like tailing the MongoDB oplog

Is there a way to listen for database changes in MySQL/MariaDB, in the same way you can tail the MongoDB oplog? I am having trouble finding information on this online. Perhaps it's only available in Postgres and not with MySQL.

like image 394
Alexander Mills Avatar asked Dec 06 '25 23:12

Alexander Mills


1 Answers

Plan A: Turn on the "general log". All queries will be written to that log. Be sure to turn it off pretty quickly; else the disk will fill up.

Plan B: Turn on the binlog. That contains all "writes". There is a program to display the contents of that log.

like image 75
Rick James Avatar answered Dec 09 '25 20:12

Rick James



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!