爱钻网

killall mysql服务 mysql服务后无法启动

编辑:tkgame 来源:爱钻网 时间:2023-03-27

Can”t init tc log Aborting | mysql事务日志导致启动失败问题,killall  mysql进程后,mysql无法启动问题总汇;

问题1:

将mysql所有进程kill掉后,重启,无法启动,报错:

110303 14:01:45 InnoDB: Started; log sequence number 0 138710263

/usr/local/mysql/bin/mysqld: File ‘./mysql-bin.000041′ not found (Errcode: 13)

110303 14:01:45 [ERROR] Failed to open log (file ‘./mysql-bin.000041′, errno 13)

110303 14:01:45 [ERROR] Could not open log file

110303 14:01:45 [ERROR] Can’t init tc log

110303 14:01:45 [ERROR] Aborting

在mysql/data/目录下找到mysql-bin.000041文件,删掉,重启,仍不行,报错:

110303 14:04:07 InnoDB: Started; log sequence number 0 138710263

/usr/local/mysql/bin/mysqld: File ‘./mysql-bin.000041′ not found (Errcode: 2)

110303 14:04:07 [ERROR] Failed to open log (file ‘./mysql-bin.000041′, errno 2)

110303 14:04:07 [ERROR] Could not open log file

110303 14:04:07 [ERROR] Can’t init tc log

110303 14:04:07 [ERROR] Aborting

touch之,修改权限,重启,也不行,报错:

110303 14:05:41 InnoDB: Started; log sequence number 0 138710263

110303 14:05:41 [ERROR] I/O error reading the header from the binary log, errno=-1, io cache code=0

110303 14:05:41 [ERROR] I/O error reading the header from the binary log

110303 14:05:41 [ERROR] Can’t init tc log

110303 14:05:41 [ERROR] Aborting

最后解决办法:

将mysql/data/mysql-bin.index文件删除,重启mysql,会自动生成新的mysql-bin.index文件,启动成功

问题2:

启动后,报错:

InnoDB: Started; log sequence number 0 1004308157

110303 14:15:01 [Note] Recovering after a crash using mysql-bin

110303 14:15:01 [ERROR] Error in Log_event::read_log_event(): ‘read error’, data_len: 169, event_type: 2

110303 14:15:01 [Note] Starting crash recovery…

110303 14:15:01 [Note] Crash recovery finished.

/opt/31306/mysql/bin/mysqld: Disk is full writing ‘./mysql-bin.~rec~’ (Errcode: 28). Waiting for someone to free space… (Expect up to 60 secs delay for server to continue after freeing disk space)

这是由于mysql-bin日志过多,进入mysql/data/目录,果断删除所有mysql-bin.*文件,重启,启动成功

问题3:

启动后,报错:

110303 14:21:37 InnoDB: Started; log sequence number 0 487312871

110303 14:21:37 [ERROR] Can’t start server: Bind on TCP/IP port: Address already in use

110303 14:21:37 [ERROR] Do you already have another mysqld server running on port: 43306 ?

110303 14:21:37 [ERROR] Aborting

按提示,应该是43306端口占用,但是查看后并未发现该端口被占用,不深究,果断将其my.cnf文件中的port修改成一个新的端口,重启,启动成功。关闭后,重新将my.cnf中的port改回为43306,重启,又可以成功启动了。

更多资讯
游戏推荐
更多+
玩家评论