[ERROR] [MY-010958] [Server] Could not open log file.[MY-010041] [Server] Can‘t init tc log

  手欠作死删了日志,然后启动就尴尬了:

  [root@chengyu ~]# vim /home/mysql8/data/chengyu.err

mysqld: File './binlog.018922' not found (OS errno 2 - No such file or directory)
2020-07-27T08:03:36.449918Z 0 [ERROR] [MY-010958] [Server] Could not open log file.
2020-07-27T08:03:36.450273Z 0 [ERROR] [MY-010041] [Server] Can't init tc log
2020-07-27T08:03:36.450778Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-07-27T08:03:38.019818Z 0 [System] [MY-010910] [Server] /usr/local/mysql8/bin/mysqld: Shutdown complete (mysqld 8.0.20)  Source distribution.

  原因:启动时读取binlog.index发现对应的binlog不见了,可以删除binlog.index中对应丢失的日志名,这里清空binlog.index,因为我删除了所有的日志,呃!
[root@chengyu ~]# true >/home/mysql8/data/binlog.index
[root@chengyu ~]# systemctl start mysqld8

[root@chengyu ~]# systemctl status mysqld8
● mysqld8.service - LSB: start and stop MySQL
   Loaded: loaded (/etc/rc.d/init.d/mysqld8; bad; vendor preset: disabled)
   Active: active (running) since Mon 2020-07-27 16:06:36 CST; 5s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2074 ExecStop=/etc/rc.d/init.d/mysqld8 stop (code=exited, status=0/SUCCESS)
  Process: 3760 ExecStart=/etc/rc.d/init.d/mysqld8 start (code=exited, status=0/SUCCESS)
    Tasks: 2
   CGroup: /system.slice/mysqld8.service
           ├─3773 /bin/sh /usr/local/mysql8/bin/mysqld_safe --datadir=/home/mysql8/data --pid-file=/...
           └─4491 /usr/local/mysql8/bin/mysqld --basedir=/usr/local/mysql8 --datadir=/home/mysql8/da...

Jul 27 16:06:21 chengyu systemd[1]: Starting LSB: start and stop MySQL...
Jul 27 16:06:36 chengyu mysqld8[3760]: Starting MySQL............... SUCCESS!
Jul 27 16:06:36 chengyu systemd[1]: Started LSB: start and stop MySQL.

2020年07月28日

  食堂某阿姨8年来一直坚持打一勺子菜再扒出来半勺子,这其中的操作奥秘我始终没参透,莫名替她心累……

猜你喜欢

转载自blog.csdn.net/u010257584/article/details/107634844