Suppress mysql warning message and truncate mysqld.log without downtime
search cancel

Suppress mysql warning message and truncate mysqld.log without downtime

book

Article ID: 276395

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

Database: 8.0.34-commercial MySQL Enterprise Server - Commercial

 

The mysqld.log file keeps increasing in size and contains lots of warnings.  Such as,

2023-11-23T21:22:13.094959Z 913679 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead

 

The /var/log mount point is over 70% usage due to the big mysqld.log file.

Resolution

1. Make change on mysql server (both nodes) to stop writing the [MY-013360]  warning message 

login mysql, run statement,

mysql> set global log_error_suppression_list='MY-013360';

 

2. Modify my.cnf on both nodes as per the KB
   https://knowledge.broadcom.com/external/article?articleNumber=225475

ie. add below line under [mysqld] section:
log_error_suppression_list='MY-013360'

 

3. Backup the mysqld.log to another server, then empty it to release disk space by running command,

cat /dev/null > /var/log/mysqld.log

 

Note :
those steps will fix the issue immediately without restart gateway or mysql.(no downtime). 
- The step1 updates the varaiable log_error_suppression_list on the mysql server directly, and it will take effect immediately.
- The step2 modifies /etc/my.cnf to make the change permenently. 

 

Note2:

If there are multiple noise messages, log_error_suppression_list can be set with multiple err_codes, separate by comma, for example,

log_error_suppression_list='MY-010236,MY-013242,MY-013746,MY-010068,MY-010909'

Additional Information

https://knowledge.broadcom.com/external/article?articleNumber=225475