zoukankan      html  css  js  c++  java
  • MySQL 慢日志没有自动创建新的日志文件

    来源地址:https://blog.csdn.net/qq_21108311/article/details/107098810

    问题:

    MySQL5.6/5.7/8.0把慢日志mv迁移到其他路径后没有自动创建新的log文件,本地新建文件也无法打印慢日志

    状态:

    mysql实例运行正常,没有看到error log,慢日志配置正常,采集时间正常,范围正常;

    解决:

    再数据库上执行刷新操作,命令:

    flush logs

    原因:

    需要刷新缓存

    注意事项:

    不需要重启数据库,不需要手动创建日志文件,刷新后mysql会自动创建日志文件,但是迁移后到执行刷新的这段时间的慢日志已丢失无法找回;

    官方原文:

    FLUSH LOGS

    Closes and reopens any log file to which the server is writing. If binary logging is enabled, the sequence number of the binary log file is incremented by one relative to the previous file. If relay logging is enabled, the sequence number of the relay log file is incremented by one relative to the previous file.

    地址:

    https://dev.mysql.com/doc/refman/5.7/en/flush.html
    ————————————————
    版权声明:本文为CSDN博主「布偶猫爸爸」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/qq_21108311/article/details/107098810

  • 相关阅读:
    SVN补充
    java面试资料总结
    JAVABEAN EJB POJO区别
    Hibernate使用原生sql语句
    Discrete Logging(poj 2417)
    卡牌游戏(bzoj 3191)
    Activation(hdu 4089)
    Aeroplane chess(hdu 4405)
    LOOPS(hdu 3853)
    巧克力(zoj 1363)
  • 原文地址:https://www.cnblogs.com/tianchao/p/15153522.html
Copyright © 2011-2022 走看看