简体   繁体   中英

Set limit on Mysql general log in RDS

I have just enabled general log in my RDS parameter group. However the log is growing in size like crazy. How do I set a limit on it?

您可以在此处查看日志文件的大小

Based on the docs you have a few options.

One thing to keep in mind is that the log files will never grow larger than 2% of the allocated storage.

According to docs

The MySQL slow query log, error log, and the general log file sizes are constrained to no more than 2 percent of the allocated storage space for a DB instance

The behavior depends on the log_output parameter, which by default is TABLE .

You could update the log_output value to FILE to force log rotation every 1 hour, but be sure to understand the differences between these parameter values

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM