Unix Technical Forum

"flush logs" vs. mysqladmin

This is a discussion on "flush logs" vs. mysqladmin within the MySQL General forum forums, part of the MySQL category; --> We run a mysqladmin flush-logs from cron every night. This causes our server to start a new binary log. ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 06:36 AM
Ofer Inbar
 
Posts: n/a
Default "flush logs" vs. mysqladmin

We run a mysqladmin flush-logs from cron every night. This causes our
server to start a new binary log. However, the slow query log does
not get flushed - our server continues updating the same slow query
log file.

If I run mysql and then issue a "flush logs" command, it flushes the
binary logs and the slow query log as well.

- Redhat ES 4
- MySQL 5.0.24 from redhat-supplied RPM
- Both mysqladmin from cron, and my mysql "flush logs", use -u root

Why does mysqladmin not flush the slow query log?
-- Cos
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 06:40 AM
Paul DuBois
 
Posts: n/a
Default Re: "flush logs" vs. mysqladmin

At 12:12 PM -0400 6/12/07, Ofer Inbar wrote:
>We run a mysqladmin flush-logs from cron every night. This causes our
>server to start a new binary log. However, the slow query log does
>not get flushed - our server continues updating the same slow query
>log file.
>
>If I run mysql and then issue a "flush logs" command, it flushes the
>binary logs and the slow query log as well.
>
> - Redhat ES 4
> - MySQL 5.0.24 from redhat-supplied RPM
> - Both mysqladmin from cron, and my mysql "flush logs", use -u root
>
>Why does mysqladmin not flush the slow query log?


It does, but the slow query log (just like the general query log)
isn't created as a numbered sequence of files. You'll need to rotate
it yourself.

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:15 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com