开发者

Can I just delete mysql localhost.log file

开发者 https://www.devze.com 2022-12-13 03:40 出处:网络
I built a system 5 years ago. These years, localhost.log in client mysql database has been accumulated to 160G. Can I just delete t开发者_Python百科his log? MySQL version is 4.0.20. Yes. IIRC, you wan

I built a system 5 years ago. These years, localhost.log in client mysql database has been accumulated to 160G. Can I just delete t开发者_Python百科his log? MySQL version is 4.0.20.


Yes. IIRC, you want to use the following procedure:

  1. Rename the log using mv or ren depending on the platform.
  2. Use mysqladmin flush-logs. This should create a new localhost.log
  3. Delete the old log that you renamed.

This procedure let's you delete the log without restarting the MySQL process.

0

精彩评论

暂无评论...
验证码 换一张
取 消