Failed to start MySQL Server,[Warning] InnoDB: Ignoring tablespace `xxxxx/cus_contract_face_tr

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

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章