简体   繁体   中英

Monitoring MySql by C#

I am currently doing a project about the monitoring of MySQL with C# and I have some problems.

I am preparing to use C# to monitor the changes in Mysql form and there is a dependency libclass in Sqlserver available to achieve this function. But I was supposed to use polling loop to do that and it is a time-consuming process, so I am wondering if there any other method available to process Mysql form to monitor the changes?

Many thanks!
Guo

If you would like to monitor a MySQL instances I might would recommend to use mysqld_exporter , which is designed to do this.

But if I understand correctly you want to monitor changes inside a table?

There are two main option to do that, you can use audit plugin , you have to use Enterprise MySQL or Percona Server which is free. You can create almost any kind of filter and log the changes.

The second option is parsing the binary log which is very common it is called Change Data Capture (CDC) , a popular application for this is maxwell .

You can find more details regarding to this question in this blog post: https://www.percona.com/blog/2016/09/13/mysql-cdc-streaming-binary-logs-and-asynchronous-triggers/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM