InnoDB: No valid checkpoint found.
MySQL啟動報錯:
SSOT01:/usr/local/mysql/data>service mysqld restart
MySQL server PID file could not be found! failed
Starting MySQL.The server quit without updating PID file (/usr/local/mysql/data/SSOT01.pid). failed
檢視err日誌:
SSOT01:/usr/local/mysql/data>tail -100 SSOT01.err
181229 13:32:12 InnoDB: Mutexes and rw_locks use GCC atomic builtins
181229 13:32:12 InnoDB: Compressed tables use zlib 1.2.3
181229 13:32:12 InnoDB: Using Linux native AIO
181229 13:32:12 InnoDB: Initializing buffer pool, size = 1.0G
181229 13:32:12 InnoDB: Completed initialization of buffer pool
181229 13:32:12 InnoDB: highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/error-creating-innodb.html
181229 13:32:12 [ERROR] Plugin 'InnoDB' init function returned error.
181229 13:32:12 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
日誌的錯誤資訊都看了,方法都試了還是不行。
最後的問題關鍵點在這裡:
InnoDB: No valid checkpoint found.
將innodb的ibdata*和ib_logfile*都刪除掉之後,重啟MYSQL,會發現原來的innodb表都丟失了,原因是因為innodb的資料是儲存在ibdata*檔案裡的,
如果保留ibdata*但將ib_logfile*都刪除掉的話,mysql還是啟動不了,會報錯no valid checkpoint found,這是因為innodb是支援事務的,啟動之後,MYSQL需要一些前滾和回滾的操作,
以保證事務的一致性,但ib_logfile*被刪除之後,無法保障事務的一致性,最終結果導致MYSQL無法啟動。
一句話總結:ib_logfile*檔案就是Oracle裡的redolog和archivelog檔案。
解決辦法:刪除innodb的ibdata*和ib_logfile*,然後重啟mysql服務。
不再報錯:
181229 14:55:35 [Note] Plugin 'FEDERATED' is disabled.
181229 14:55:35 InnoDB: The InnoDB memory heap is disabled
181229 14:55:35 InnoDB: Mutexes and rw_locks use GCC atomic builtins
181229 14:55:35 InnoDB: Compressed tables use zlib 1.2.3
181229 14:55:35 InnoDB: Using Linux native AIO
181229 14:55:35 InnoDB: Initializing buffer pool, size = 5.0G
181229 14:55:36 InnoDB: Completed initialization of buffer pool
181229 14:55:36 InnoDB: highest supported file format is Barracuda.
181229 14:55:36 InnoDB: Waiting for the background threads to start
181229 14:55:37 InnoDB: 1.1.8 started; log sequence number 1595675
Thread pool plugin started successfully with parameters:
thread_pool_size = 24,
thread_pool_algorithm = Low Concurrency Algorithm
thread_pool_stall_limit = 6
thread_pool_prio_kickup_timer = 1000
thread_pool_max_unused_threads = 0
啟動正常:
SSOT01:/usr/local/mysql/data>service mysqld restart
MySQL server PID file could not be found! failed
Starting MySQL........ done
之前是刪除了ibdata*或ib_logfile*,都無法啟動mysql服務
而且SSOT01.pid這個檔案就算手工建立也會自動被刪除。
必須把ibdata*和ib_logfile*都刪除才可以,再重新啟動mysql服務正常,並重新自動生成了SSOT01.pid檔案。
但是因為資料庫是innodb_file_per_table | OFF 共享表空間模式,所以刪除ibdata*後,資料檔案還需要自己手工還原。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22996654/viewspace-2286956/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- A valid provisioning profile for this executable was not found.
- mysql checkpointMySql
- Postgresql 的CheckpointSQL
- spring - mvc - @ValidSpringMVC
- Longest Valid Parentheses
- PostgreSQL備機checkpointSQL
- checkpoint詳解(zt)
- 125. Valid Palindrome
- Leetcode 20 Valid ParenthesesLeetCode
- Leetcode 36 Valid SudokuLeetCode
- Plugin with id 'com.android.application' not found.PluginAndroidAPP
- Flink - Checkpoint配置注意點
- checkpoint是什麼(zt)
- PG:checkpoint是什麼
- gipchaLowerProcessNode: no valid interfaces found to node
- Please provide a valid cache pathIDE
- 941. Valid Mountain ArrayAI
- await is only valid in async functionAIFunction
- Leetcode 32 Longest Valid ParenthesesLeetCode
- CSS :valid 選擇器CSS
- HDFS 重要機制之 checkpoint
- MySQL checkpoint執行時機MySql
- alter table drop unused columns checkpoint
- PostgreSQL DBA(168) - pgAdmin(config:checkpoint)SQL
- Flink Checkpoint 引數詳解
- @Valid和@Validated的區別
- @Valid 與 @Validated 的區別
- Caused by: Error: ' ' is not a valid resource name characterError
- [LeetCode] 678. Valid Parenthesis StringLeetCode
- [LeetCode] 32. Longest Valid ParenthesesLeetCode
- Leetcode 611 javascript Valid Triangle NumberLeetCodeJavaScript
- No suitable application records were found. Verify your bundle ideUIAPPIDE
- 解決nltk_data LookupError: Resource punkt not found.Error
- org.apache.ibatis.binding.BindingException: Parameter 'xxx' not found.ApacheBATException
- MySQL筆記之Checkpoint機制MySql筆記
- 基於 Log 的通用增量 Checkpoint
- MySQL中的redo log和checkpointMySql
- PostgreSQL-PG程式之checkpoint(四)SQL