mysql -uroot –p*** -e 'show master logs; purge master logs before date_sub(now(), interval 1 day); show master logs;'
sample output
+------------------+------------+
| Log_name | File_size |
+------------------+------------+
| mysql-bin.000325 | 1073741878 |
| mysql-bin.000326 | 532809491 |
+------------------+------------+
+------------------+------------+
| Log_name | File_size |
+------------------+------------+
| mysql-bin.000326 | 532809491 |
+------------------+------------+
No comments:
Post a Comment