Logging of failure in DB replication

book

Article ID: 104026

calendar_today

Updated On:

Products

CA API Gateway (Layer 7) SA94 to API SECURITY STARTER PACK-7 CA Rapid App Security MOBILE API GATEWAY CA Mobile - API Gateway CA API Gateway

Issue/Introduction



The ssg logs dont really have any trace of replication since that is from the mysql <-> mysql directly. The mysql commands to look for replication error are :
> show slaves;
> show slave status;

will show the last replication error. And the file /var/log/mysqld.log will also have errors if there is issue with replication.

But is there any way that mysql errors can be logged to syslog.

Environment

APIM Gateway 9.2 
APIM Gateway 9.3
 

Resolution


Gateway 9.2 
The version of mysql is 5.5 : so there are some methods that can be used : 

https://dba.stackexchange.com/questions/3552/how-do-i-output-mysql-logs-to-syslog 

Gateway 9.3: 
https://docops.ca.com/ca-api-gateway/9-3/en/release-notes-9-3/new-features-and-enhancements 

Now comes with mysql 5.7 which has better syslog support : 

https://dev.mysql.com/doc/refman/5.7/en/error-log-syslog.html 

Some of those options look like what you want.