2019-08-01T03:12:04.698151Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
3 2019-08-01T03:12:04.698996Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.23) starting as process 23518 ...
4 2019-08-01T03:12:04.700858Z 0 [Note] InnoDB: PUNCH HOLE support available
5 2019-08-01T03:12:04.700874Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
6 2019-08-01T03:12:04.700877Z 0 [Note] InnoDB: Uses event mutexes
7 2019-08-01T03:12:04.700879Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
8 2019-08-01T03:12:04.700881Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
9 2019-08-01T03:12:04.700886Z 0 [Note] InnoDB: Using Linux native AIO
10 2019-08-01T03:12:04.701057Z 0 [Note] InnoDB: Number of pools: 1
11 2019-08-01T03:12:04.701125Z 0 [Note] InnoDB: Using CPU crc32 instructions
12 2019-08-01T03:12:04.701888Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
13 2019-08-01T03:12:04.706561Z 0 [Note] InnoDB: Completed initialization of buffer pool
14 2019-08-01T03:12:04.707650Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
15 2019-08-01T03:12:04.718858Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
16 2019-08-01T03:12:04.719580Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 175333794254
17 2019-08-01T03:12:04.803784Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 175339036672
18 2019-08-01T03:12:04.888220Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 175344279552
19 2019-08-01T03:12:04.990811Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 175349522432
20 2019-08-01T03:12:05.011645Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 175350458286
21 2019-08-01T03:12:05.012073Z 0 [Note] InnoDB: Database was not shutdown normally!
22 2019-08-01T03:12:05.012078Z 0 [Note] InnoDB: Starting crash recovery.
23 2019-08-01T03:12:05.012109Z 0 [ERROR] InnoDB: Tablespace 34418 was not found at ./bms20190801/cus_contract_repayment_other_fee.ibd.
24 2019-08-01T03:12:05.012112Z 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace.
25 2019-08-01T03:12:05.012114Z 0 [ERROR] InnoDB: Tablespace 34416 was not found at ./bms20190801/cus_contract_repayment.ibd.
26 2019-08-01T03:12:05.012509Z 0 [ERROR] InnoDB: Tablespace 34417 was not found at ./bms20190801/cus_contract_repayment_delete.ibd.
27 2019-08-01T03:12:05.012833Z 0 [ERROR] InnoDB: Cannot continue operation.
28 2019-08-01T03:12:05.908172Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
29 2019-08-01T03:12:05.909009Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.23) starting as process 23558 ...
30 2019-08-01T03:12:05.910884Z 0 [Note] InnoDB: PUNCH HOLE support available
31 2019-08-01T03:12:05.910901Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
32 2019-08-01T03:12:05.910904Z 0 [Note] InnoDB: Uses event mutexes
33 2019-08-01T03:12:05.910905Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
34 2019-08-01T03:12:05.910907Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
35 2019-08-01T03:12:05.910909Z 0 [Note] InnoDB: Using Linux native AIO
36 2019-08-01T03:12:05.911081Z 0 [Note] InnoDB: Number of pools: 1
37 2019-08-01T03:12:05.911151Z 0 [Note] InnoDB: Using CPU crc32 instructions
38 2019-08-01T03:12:05.911952Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
39 2019-08-01T03:12:05.916642Z 0 [Note] InnoDB: Completed initialization of buffer pool
40 2019-08-01T03:12:05.917652Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
41 2019-08-01T03:12:05.929023Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
42 2019-08-01T03:12:05.929741Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 175333794254
43 2019-08-01T03:12:06.013555Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 175339036672
44 2019-08-01T03:12:06.097833Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 175344279552
45 2019-08-01T03:12:06.200506Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 175349522432
46 2019-08-01T03:12:06.221100Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 175350458286
47 2019-08-01T03:12:06.221526Z 0 [Note] InnoDB: Database was not shutdown normally!
48 2019-08-01T03:12:06.221530Z 0 [Note] InnoDB: Starting crash recovery.
49 2019-08-01T03:12:06.221560Z 0 [ERROR] InnoDB: Tablespace 34418 was not found at ./bms20190801/cus_contract_repayment_other_fee.ibd.
50 2019-08-01T03:12:06.221564Z 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace.
51 2019-08-01T03:12:06.221567Z 0 [ERROR] InnoDB: Tablespace 34416 was not found at ./bms20190801/cus_contract_repayment.ibd.
52 2019-08-01T03:12:06.221996Z 0 [ERROR] InnoDB: Tablespace 34417 was not found at ./bms20190801/cus_contract_repayment_delete.ibd.
场景:今天还原一个数据库,还原一半就挂掉了,怎么起也起不来,然后查看日志,一般的页面错误日志没什么卵用,还是看mysqld.log稳.
原来是磁盘满了, df -h 发现挂载都用了100%,清理了一波,重启mysqld一直起不来,一直报错.报错日志就是上面那一坨.主要就是innodb的一种机制,检查之前的库, 倒到一半就挂了,这也没办法,只能清了从新来,就去到 /var/lib/mysql/bms20190801 删除这个库.重新启动,还是不行.
之后看了一些大神的处理方法,很是管用.
修改/etc/my.cnf 在[mysqld] 加入几个参数,启动完后删除就可以了,我就是用了一次
innodb_force_recovery=5
innodb_fast_shutdown=1
重启mysql
完成后修改回原来的配置
innodb_force_recovery=0
#innodb_force_recovery=5
#innodb_fast_shutdown=1