clearing mysql binary logs from a script

Discussion in 'MySQL' started by komrad, Oct 25, 2008.

  1. #1
    Hello all,

    I'd like to know how to clear down mysql binary logs from a script.
    I have a script which runs this:
    "C:\Program Files\mysql\bin\mysql" -uroot -prootpasswd < C:\ClearBinaryLogs.sql

    ClearBinaryLogs.sql:
    use db
    PURGE MASTER LOGS BEFORE 'NOW()';

    doesn't clear anything but seems to complete without any errors and all the paths are correct, anyone have any ideas?

    Thanks in advance.
     
    komrad, Oct 25, 2008 IP