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

Suppress mysql warning message and truncate mysqld.log without downtime


Article ID: 276395


Updated On:


CA API Gateway


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.


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

ie. add below line under [mysqld] section:


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. 



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


Additional Information