清理binlog有三种解决方法:
1. 关闭mysql主从,关闭binlog;
2. 开启mysql主从,设置expire_logs_days;expire_logs_days = 15 #自动删除15天前的日志。默认值为0,表示从不删除。
3. 手动清除binlog文件

#查看当前binlog文件
show master status;
#查看所有binlog
show binary logs;
PURGE MASTER LOGS TO 'mysql-bin.000312';   #删除binlog.0000058之前的,不包括binlog.000058
PURGE MASTER LOGS BEFORE '2020-12-22 13:00:00';   //清除2020-12-22 13:00:00前binlog日志
PURGE MASTER LOGS BEFORE DATE_SUB( NOW( ), INTERVAL 3 DAY);  #清除3天前binlog日志 //清除3天前binlog日志BEFORE,变量的date自变量可以为'YYYY-MM-DD hh:mm:ss'格式。

538 对 “mysql 清理bin-log”的想法;

  1. Hello, Neat post. There’s an issue together with your site in web explorer, could check this?
    IE still is the marketplace leader and a large section of other folks
    will leave out your fantastic writing due to
    this problem.

  2. May I simply just say what a relief to uncover someone who really understands what they are discussing on the net.
    You actually realize how to bring a problem to light
    and make it important. More and more people have to
    look at this and understand this side of the story.
    I can’t believe you aren’t more popular since you definitely have the gift.

  3. Have you ever thought about writing an e-book or guest authoring on other blogs?
    I have a blog based on the same ideas you discuss
    and would love to have you share some stories/information. I know my viewers would value your work.

    If you’re even remotely interested, feel free to send me an email.

  4. Thank you for the good writeup. It in fact was a amusement account it.
    Look complicated to far added agreeable from you!
    However, how can we keep in touch?

  5. Hey! Quick question that’s completely off topic. Do
    you know how to make your site mobile friendly?
    My blog looks weird when viewing from my apple iphone.
    I’m trying to find a theme or plugin that might be able to correct
    this issue. If you have any suggestions, please share.
    With thanks!

  6. Excellent way of explaining, and nice post to get information about my presentation subject matter, which i am going to deliver
    in institution of higher education.

  7. You actually make it appear really easy together with your presentation but I in finding this matter to be really one thing which I think I would by no means understand.
    It seems too complicated and extremely wide for me. I am taking a look ahead
    to your next publish, I’ll attempt to get the dangle of it!

  8. Hello would you mind letting me know which webhost you’re utilizing?
    I’ve loaded your blog in 3 completely different web
    browsers and I must say this blog loads a lot faster then most.
    Can you suggest a good internet hosting provider at a
    honest price? Thanks a lot, I appreciate it!

  9. What’s up, this weekend is good in support of me, for the reason that this point in time i
    am reading this fantastic informative post here at my home.

  10. I was curious if you ever considered changing the layout of
    your website? Its very well written; I love what
    youve got to say. But maybe you could a little more in the way of
    content so people could connect with it better. Youve
    got an awful lot of text for only having 1 or 2 pictures.
    Maybe you could space it out better?

  11. Some wonderful photos. Incredible colors.
    [url=https://sites.google.com/view/aviator-spribe/]spribe aviator[/url]
    [url=https://sites.google.com/view/bitcoin-up-app/]bitcoin up[/url]
    [url=https://sites.google.com/view/pin-upcasino/]pin up[/url]

  12. You’re so interesting! I don’t believe I’ve truly read something like this before.

    So nice to find someone with a few original thoughts on this topic.
    Seriously.. thanks for starting this up. This website is
    something that is needed on the internet, someone with a little originality!

  13. Evden Eve Nakliyat
    Nakliyat firmaları seçimi taşınma sürecinin ilk ve en önemli basamağıdır.
    Alacağınız evden eve nakliyat hizmetinin nasıl geçeceğini seçtiğiniz nakliyat firması belirler.
    Bu yüzden evden eve nakliyat firmaları arasında seçim yaparken oldukça dikkatli ve hassas olmak gerekir.

    Bu konuda bütçe dostunuz ve güvenilir taşımacılık ile anılan Smart ® Sistem yanınızda

  14. Just desire to say your article is as astounding.
    The clearness in your post is simply cool and i can assume you’re an expert on this subject.
    Fine with your permission let me to grab your feed to keep up
    to date with forthcoming post. Thanks a million and please keep up the gratifying work.

  15. Hello great blog! Does running a blog like this require a lot of work?
    I have virtually no knowledge of programming however I had
    been hoping to start my own blog soon. Anyways, if you
    have any ideas or tips for new blog owners please share. I know this is off
    subject however I simply wanted to ask. Kudos!

  16. [url=https://xn--80aaajbdbddwj2alwjieei2afr3v.xn--p1ai/]займ личный кабинет[/url]
    [url=https://buhgalter-vrn.ru/]бухгалтерские услуги налоговый учет[/url]
    [url=https://wiki-work.ru/]заработок денег без интернета[/url]

    23693664672361212

  17. Someone essentially help to make seriously posts I’d state.
    That is the first time I frequented your web page and
    so far? I amazed with the research you made to create this particular submit amazing.
    Wonderful process!

  18. You really make it seem so easy with your presentation but I to find this topic to be really
    one thing which I think I would never understand.
    It sort of feels too complicated and extremely wide for me.

    I am having a look forward to your next publish, I will try
    to get the grasp of it!

  19. Hi there, i read your blog from time to time and i own a similar one and i was just
    curious if you get a lot of spam comments? If so how do you prevent it, any plugin or anything you can suggest?
    I get so much lately it’s driving me insane so any assistance is very much appreciated.

  20. Hello, i read your blog occasionally and i own a similar one and i was just wondering if you get
    a lot of spam feedback? If so how do you protect against it, any plugin or anything you can suggest?
    I get so much lately it’s driving me insane so any assistance
    is very much appreciated.

  21. Have you ever considered writing an e-book or guest authoring on other blogs?
    I have a blog based on the same information you discuss and would
    love to have you share some stories/information. I know my visitors would
    appreciate your work. If you’re even remotely interested, feel free to
    send me an e mail.

  22. With havin so much written content do you ever run into any issues of plagorism or copyright
    infringement? My blog has a lot of completely unique content I’ve either written myself or outsourced but it looks like a lot of
    it is popping it up all over the internet without my authorization. Do you
    know any ways to help stop content from being stolen? I’d definitely appreciate it.

  23. Thanks for ones marvelous posting! I quite enjoyed
    reading it, you happen to be a great author.I will make
    certain to bookmark your blog and will come back down the road.
    I want to encourage you to continue your great job, have a nice day!

发表评论

邮箱地址不会被公开。