Mysql启动报错解决方案:Failed to open log (file './mysql-bin.000901', errno 2)

ps -ef|grep mysql

发现里边没有mysql进程,于是进行重启。

service mysqld start报错

查看错误日志

tail -100 /usr/local/mysql/var/iZ11yohng9aZ.err(主机名.err)

180223 15:31:51 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
180223 15:31:51 InnoDB: The InnoDB memory heap is disabled
180223 15:31:51 InnoDB: Mutexes and rw_locks use GCC atomic builtins
180223 15:31:51 InnoDB: Compressed tables use zlib 1.2.3
180223 15:31:51 InnoDB: Initializing buffer pool, size = 16.0M
180223 15:31:51 InnoDB: Completed initialization of buffer pool
180223 15:31:51 InnoDB: highest supported file format is Barracuda.
180223 15:31:51  InnoDB: Waiting for the background threads to start
180223 15:31:52 InnoDB: 5.5.42 started; log sequence number 106443096
/usr/local/mysql/bin/mysqld: File ‘./mysql-bin.000901‘ not found (Errcode: 2)
180223 15:31:52 [ERROR] Failed to open log (file ‘./mysql-bin.000901‘, errno 2)
180223 15:31:52 [ERROR] Could not open log file
180223 15:31:52 [ERROR] Can‘t init tc log
180223 15:31:52 [ERROR] Aborting

180223 15:31:52  InnoDB: Starting shutdown...
180223 15:31:53  InnoDB: Shutdown completed; log sequence number 106443096
180223 15:31:53 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

180223 15:31:53 mysqld_safe mysqld from pid file /usr/local/mysql/var/iZ11yohng9aZ.pid ended

可以看到,错误日志中出现的错误信息: Failed to open log (file ‘./mysql-bin.000901‘, errno 2)

于是尝试解决方案如下:

cd /usr/local/mysql/var/
cp mysql-bin.index mysql-bin.index.bak(备份)
vi mysql-bin.index
删除其中的mysql-bin.000901

然后进行重启,mysql启动成功

Mysql启动报错解决方案:Failed to open log (file './mysql-bin.000901', errno 2)

原文地址:https://www.cnblogs.com/chenguoli/p/8462345.html

时间: 2024-10-12 17:27:43

Mysql启动报错解决方案:Failed to open log (file './mysql-bin.000901', errno 2)的相关文章

VM虚拟机启动报错Reason Failed to lock the file怎么办

VMware启动报错Reason: Failed to lock the file的解决方法 症状:  启动VMware虚拟机的时候出现了Cannot open the disk '*.vmdk' or one of the snapshot disks it depends on.Reason: Failed to lock the file.的错误. 解决办法一: 1.在VMware该虚拟机路径下的所有.lck文件和文件夹下删除或迁移至其它目录,一般就可以解决了. 2.如果再次启动VMwar

MySql启动报错,无法更新PID文件

MySql启动报错 Starting MySQL.. ERROR! The server quit without updating PID file (/var/lib/mysql..) 1,查看错误日志 2017-08-10 19:38:14 31865 [Note] InnoDB: Initializing buffer pool, size = 50.0M InnoDB: mmap(53657600 bytes) failed; errno 12 2017-08-10 19:38:14

mysql启动报错:Table 'mysql.host' doesn't exist

今天在安装mysql后,启动时候没有启动成功,查看了下日志报错如下: --------------------------------------------- [[email protected] local]# less /var/log/mysqld.log 1.查看报错信息如下: [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 2.经过查阅资料得知.要敲

springboot启动报错:Failed to configure a DataSource

一.背景 springboot的出现,让项目搭建变得更方便快捷,同时简化掉很多的样板化配置代码,提高开发效率. 通过idea生成springboot项目,启动报错:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. 通过错误不难看出是因为dataSource的url配置缺失导致,但是新生成的项目并没有使用到jdbc,为什

linux mysql启动报错Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

vi /etc/my.cnf  查看日志文件路径: log-error=/var/log/mysqld.log 查看报错日志: 之前的服务器被别人拿了,所以自己买了台美国vps,根据笔记安装完启动mysql,又启动不了. 查看了错误日志 引用 090321 18:55:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data /usr/local/mysql/libexec/mysqld: Ta

mysql 启动报错 “mysql-bin.index not found (Errcode: 13)“

安装好mysql数据库后,直接在安装的目录下 /usr/local/mysql  下新建了一个目录data 用于存放数据,建好后,直接去启动数据库,发现启动不了,出现如下报错: mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data /usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13) [E

mysql启动报错

mysql启动报错的原因常见的有一下几种: 1.数据所在分区满了 2.pid所在目录mysql用户没有写权限 3.存储引擎为innodb引擎,这个时候启动的时候需要恢复所有的操作(select,create,drop,insert.update,delete),当不能有效的执行恢复操作的时候,mysql启动报错 早上来上班的时候,被通知整栋大楼要停电,想了一下,公司机房还放了几台测试机,如果突然断电的话,会导致测试机中的虚拟机不可用,赶紧一台一台关机吧,其中有一台虚拟机上装着mysql,先进去把

新安装的MySQL启动报错The server quit without updating PID file

安装的MySQL启动报错The server quit without updating PID file [[email protected] mysql]# service mysqld restart MySQL server PID file could not be found!                  [失败] Starting MySQL.The server quit without updating PID file (/[失败]ysql/l ocalhost.loc

MYSQL启动报1067错误,系统日志中是“服务 mysql 意外停止” Mysql日志中则是:“Plugin \'FEDERATED\' is disabled”

MYSQL启动报1067错误,系统日志中是"服务 mysql 意外停止" Mysql日志中则是:"Plugin \'FEDERATED\' is disabled" 错误的具体内容是: 121012 11:35:03 [Note] Plugin 'FEDERATED' is disabled. 121012 11:35:03  InnoDB: Error: unable to create temporary file; errno: 2 121012 11:35: