MySQL啟動時InnoDB引擎被停用了怎麼辦?最近在工作上遇到一個問題,現將解決的方法分享出來供大家參考學習,下面這篇文章主要給大家介紹了關於MySQL啟動時InnoDB引擎被禁用了的解決方法,需要的朋友們下面跟著小編來一起學習學習吧。希望能幫助大家。
發現問題
今天在工作中,從本機資料庫複製表格資料到虛擬機器CentOS 6.6 上的資料庫時,得到提示:
Unknown table engine 'InnoDB'
於是在伺服器MySQL 中檢視了引擎:
mysql> show engines\G
得到:
*************************** 1. row *************************** Engine: MyISAM Support: DEFAULT Comment: MyISAM storage engine Transactions: NO XA: NO Savepoints: NO *************************** 2. row *************************** Engine: CSV Support: YES Comment: CSV storage engine Transactions: NO XA: NO Savepoints: NO *************************** 3. row *************************** Engine: MEMORY Support: YES Comment: Hash based, stored in memory, useful for temporary tables Transactions: NO XA: NO Savepoints: NO *************************** 4. row *************************** Engine: BLACKHOLE Support: YES Comment: /dev/null storage engine (anything you write to it disappears) Transactions: NO XA: NO Savepoints: NO *************************** 5. row *************************** Engine: MRG_MYISAM Support: YES Comment: Collection of identical MyISAM tables Transactions: NO XA: NO Savepoints: NO *************************** 6. row *************************** Engine: PERFORMANCE_SCHEMA Support: YES Comment: Performance Schema Transactions: NO XA: NO Savepoints: NO *************************** 7. row *************************** Engine: ARCHIVE Support: YES Comment: Archive storage engine Transactions: NO XA: NO Savepoints: NO *************************** 8. row *************************** Engine: FEDERATED Support: NO Comment: Federated MySQL storage engine Transactions: NULL XA: NULL Savepoints: NULL *************************** 9. row *************************** Engine: InnoDB Support: NO Comment: Supports transactions, row-level locking, and foreign keys Transactions: NULL XA: NULL Savepoints: NULL rows in set (0.00 sec)
在InnoDB 的Supports 為NO
解決方法
編輯my.cnf
[root@localhost mysql]# vim /etc/my.cnf
把其中innodb = OFF 改為innodb = ON
同時把skip-innodb 註解掉即可。
相關推薦:
MySQL InnoDB和MyISAM資料引擎的差異分析詳解
以上是MySQL啟動時InnoDB引擎被停用了怎麼辦的詳細內容。更多資訊請關注PHP中文網其他相關文章!