Loading

MySQL启动报错Failed to open log (file 'D:\phpStudy\PHPTutorial\MySQL\data\mysql_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:\phpStudy\PHPTutorial\MySQL\bin\mysqld.exe: File 'D:\phpStudy\PHPTutorial\MySQL\data\mysql_bin.000045' not found (Errcode: 2)
191105  9:39:09 [ERROR] Failed to open log (file 'D:\phpStudy\PHPTutorial\MySQL\data\mysql_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:\phpStudy\PHPTutorial\MySQL\bin\mysqld.exe: Shutdown complete

找到MySQL配置文件

D:\phpStudy\PHPTutorial\MySQL\my.ini

方法一:

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

方法二:

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

打开mysql.index删除里面的D:\phpStudy\PHPTutorial\MySQL\data\mysql_bin.000045

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

posted @ 2019-11-05 09:57  王召波  阅读(839)  评论(0编辑  收藏  举报