telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

Input plugin mysql.conf "gather_binary_logs" is not compatible for mysql 8.0

Open zzcpower opened this issue 5 years ago • 3 comments

Hi there,

The error log is generated by "gather_binary_log" in mysql.conf for mysql 8.0

Telegraf runs successfully in mysql 5.7. And it runs successfully if I comment the "gather_binary_logs = True" for mysql 8.0

In my opinion, the problem is occurred because of the update of binary log in mysql 8.0 If we look at the difference of binary log between 8.0 and 5.7, we can find that there is one more column "Encrypted" in mysql 8.0. It seems that our code mysql.go has not been compatible with this update yet.

See the difference of binary logs in the links below. https://dev.mysql.com/doc/refman/8.0/en/show-binary-logs.html https://dev.mysql.com/doc/refman/5.7/en/show-binary-logs.html

THANKS Zichu

zzcpower avatar Mar 29 '21 06:03 zzcpower

Hi, this makes sense and thanks for the issue. Would you be able to add an example of an error log you receive when this error occurs?

ivorybilled avatar Mar 29 '21 15:03 ivorybilled

Sure E! [inputs.mysql] Error in plugin: sql: expected 3 destination arguments in Scan, not 2

zzcpower avatar Mar 30 '21 04:03 zzcpower

This should be simple enough to implement, will hopefully get to this at some point.

ivorybilled avatar Mar 30 '21 18:03 ivorybilled