Mysql – How to suppress specific warnings in thesql error log when ignoring a table to replicate

error logMySQLmysql-5.6

Is there a way to make the mysql error log less chatty with certain warnings? I just threw in the replicate-ignore-table option in my.cnf so our health check table doesn't get replicated. However now I'm getting a couple warnings every minute telling me something that I specifically want to happen… and it's annoying, not to mention that the log will grow at a much faster rate now.

I thought adding slave-skip-errors=1237 would fix it, but it's not an actual error that's stopping replication.

Any ideas?

2015-07-16 21:51:02 31210 [Warning] Error log throttle: 4 time(s) Error_code: 1237 "Slave SQL thread ignored the query because of replicate-*-table rules" got suppressed.
2015-07-16 21:51:02 31210 [Warning] Slave SQL: Could not execute Query event. Detailed error: Slave SQL thread ignored the query because of replicate-*-table rules; Error log throttle is enabled. This error will not be displayed for next 60 secs. It will be suppressed, Error_code: 1237
2015-07-16 21:53:01 31210 [Warning] Error log throttle: 3 time(s) Error_code: 1237 "Slave SQL thread ignored the query because of replicate-*-table rules" got suppressed.
2015-07-16 21:53:01 31210 [Warning] Slave SQL: Could not execute Query event. Detailed error: Slave SQL thread ignored the query because of replicate-*-table rules; Error log throttle is enabled. This error will not be displayed for next 60 secs. It will be suppressed, Error_code: 1237
2015-07-16 21:54:01 31210 [Warning] Error log throttle: 2 time(s) Error_code: 1237 "Slave SQL thread ignored the query because of replicate-*-table rules" got suppressed.
2015-07-16 21:54:01 31210 [Warning] Slave SQL: Could not execute Query event. Detailed error: Slave SQL thread ignored the query because of replicate-*-table rules; Error log throttle is enabled. This error will not be displayed for next 60 secs. It will be suppressed, Error_code: 1237
2015-07-16 21:55:01 31210 [Warning] Error log throttle: 3 time(s) Error_code: 1237 "Slave SQL thread ignored the query because of replicate-*-table rules" got suppressed.
2015-07-16 21:55:01 31210 [Warning] Slave SQL: Could not execute Query event. Detailed error: Slave SQL thread ignored the query because of replicate-*-table rules; Error log throttle is enabled. This error will not be displayed for next 60 secs. It will be suppressed, Error_code: 1237
2015-07-16 21:56:02 31210 [Warning] Error log throttle: 2 time(s) Error_code: 1237 "Slave SQL thread ignored the query because of replicate-*-table rules" got suppressed.
2015-07-16 21:56:02 31210 [Warning] Slave SQL: Could not execute Query event. Detailed error: Slave SQL thread ignored the query because of replicate-*-table rules; Error log throttle is enabled. This error will not be displayed for next 60 secs. It will be suppressed, Error_code: 1237    

Best Answer

You can:

Set global log_warnings=0;