Skip to content

Commit

Permalink
Fix incorrect binlog permissions errors (#18785)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethsamuel authored Oct 8, 2024
1 parent 0b2723e commit efa33ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions mysql/changelog.d/18785.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed an incorrect warning when binary logs were disabled
5 changes: 4 additions & 1 deletion mysql/datadog_checks/mysql/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,10 @@ def _get_replica_stats(self, db, is_mariadb, replication_channel):
if binlog_results:
replica_results.update({'Binlog_enabled': True})
except (pymysql.err.InternalError, pymysql.err.OperationalError) as e:
self.warning("Privileges error getting binlog information (must grant REPLICATION CLIENT): %s", e)
if "You are not using binary logging" in str(e):
replica_results.update({'Binlog_enabled': False})
else:
self.warning("Privileges error getting binlog information (must grant REPLICATION CLIENT): %s", e)

return replica_results

Expand Down

0 comments on commit efa33ba

Please sign in to comment.