如何清空MySQL日志文件

By admin, 14 五月, 2015

mysql运行久了会放很多日志文件在/var/lib/mysql下,每天几百M,很快会填满硬盘,可以用下面方法清空日志:

shell> mysql -u username -p
mysql> PURGE BINARY LOGS BEFORE '2009-05-01 00:00:00';

Reference: http://systems.takizo.com/2009/08/23/how-to-remove-mysql-binary-log/

标签

评论

Restricted HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。
验证码
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
请输入"Drupal10"

最新评论