zoukankan      html  css  js  c++  java
  • MySQL启动报错Failed to open log (file 'D:phpStudyPHPTutorialMySQLdatamysql_bin.000045', errno 2)

    MySQL报错

    191105  9:39:07 [Note] Plugin 'FEDERATED' is disabled.
    191105  9:39:07 InnoDB: The InnoDB memory heap is disabled
    191105  9:39:07 InnoDB: Mutexes and rw_locks use Windows interlocked functions
    191105  9:39:07 InnoDB: Compressed tables use zlib 1.2.3
    191105  9:39:07 InnoDB: Initializing buffer pool, size = 47.0M
    191105  9:39:07 InnoDB: Completed initialization of buffer pool
    191105  9:39:07 InnoDB: highest supported file format is Barracuda.
    191105  9:39:08  InnoDB: Waiting for the background threads to start
    191105  9:39:09 InnoDB: 5.5.53 started; log sequence number 2389058
    D:phpStudyPHPTutorialMySQLinmysqld.exe: File 'D:phpStudyPHPTutorialMySQLdatamysql_bin.000045' not found (Errcode: 2)
    191105  9:39:09 [ERROR] Failed to open log (file 'D:phpStudyPHPTutorialMySQLdatamysql_bin.000045', errno 2)
    191105  9:39:09 [ERROR] Could not open log file
    191105  9:39:09 [ERROR] Can't init tc log
    191105  9:39:09 [ERROR] Aborting
    
    191105  9:39:09  InnoDB: Starting shutdown...
    191105  9:39:09  InnoDB: Shutdown completed; log sequence number 2389058
    191105  9:39:09 [Note] D:phpStudyPHPTutorialMySQLinmysqld.exe: Shutdown complete

    找到MySQL配置文件

    D:phpStudyPHPTutorialMySQLmy.ini

    方法一:

    在log_bin="D:/phpStudy/PHPTutorial/MySQL/data/mysql_bin"前面加#注释掉

    方法二:

    找到log_bin路径,里面有一个mysql.index,(我的路径是D:/phpStudy/PHPTutorial/MySQL/data)

    打开mysql.index删除里面的D:phpStudyPHPTutorialMySQLdatamysql_bin.000045

    (方法二需要注意,默认是mysql.index. 如果你和我一样改了默认log_bin配置,我改成mysql_bin了,所以我要改的文件是mysql_bin.index)

  • 相关阅读:
    最短路模板
    Vue中的列表item依次进入动画
    Vue2.6.11中禁止点击事件冒泡
    <img/>标签实现加载错误图的方法(包含Vue框架中的使用)
    H5实现弹窗从下边弹出、关闭效果
    CSS img 宽度固定,高度自适应
    CSS实现Android LinearLayout的效果
    css中实现Android relativeLayout的效果
    Android Log写入本地文件
    Cannot fit requested classes in a single dex file (# methods: 148419 > 65536
  • 原文地址:https://www.cnblogs.com/wangzhaobo/p/11796651.html
Copyright © 2011-2022 走看看