MySQL Recovering after a crash using tc.log
After MySQL upgrade from MraiaDB 10.1 to 10.3, MySQL failed to start. On checking log, found
root@localhost:/var/log/mysql# cat error.log 2019-09-23 6:30:10 0 [Note] InnoDB: Using Linux native AIO 2019-09-23 6:30:10 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2019-09-23 6:30:10 0 [Note] InnoDB: Uses event mutexes 2019-09-23 6:30:10 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2019-09-23 6:30:10 0 [Note] InnoDB: Number of pools: 1 2019-09-23 6:30:10 0 [Note] InnoDB: Using SSE2 crc32 instructions 2019-09-23 6:30:10 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2019-09-23 6:30:10 0 [Note] InnoDB: Completed initialization of buffer pool 2019-09-23 6:30:10 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2019-09-23 6:30:10 0 [Note] InnoDB: 128 out of 128 rollback segments are active. 2019-09-23 6:30:10 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2019-09-23 6:30:10 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2019-09-23 6:30:10 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2019-09-23 6:30:10 0 [Note] InnoDB: Waiting for purge to start 2019-09-23 6:30:10 0 [Note] InnoDB: 10.3.17 started; log sequence number 682398229; transaction id 1563655 2019-09-23 6:30:10 0 [Note] Plugin 'FEEDBACK' is disabled. 2019-09-23 6:30:10 0 [Note] Recovering after a crash using tc.log 2019-09-23 6:30:10 0 [ERROR] Can't init tc log 2019-09-23 6:30:10 0 [ERROR] Aborting root@localhost:/var/log/mysql#
On /var/lib/mysql folder, there is a tc.log file with 0 size. The error is solved by removing this file.
mv /var/lib/mysql/tc.log /root/