MySQL啟動時InnoDB引擎被禁用了怎么辦

mysql啟動時innodb引擎被禁用了怎么辦?最近在工作中遇到一個問題,現將解決的方法分享出來供大家參考學習,下面這篇文章主要給大家介紹了關于mysql啟動時innodb引擎被禁用了的解決方法,需要的朋友們下面跟著小編來一起學習學習吧。希望能幫助到大家。

發現問題

今天在工作中,從本地數據庫復制表數據到虛擬機 CentOS 6.6 上的數據庫時,得到提示:

Unknown table engine 'InnoDB'

于是在服務器 MySQL 中查看了引擎:

mysql> show enginesG

得到:

*************************** 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存儲引擎MyISAM和InnoDB之間的比較

MySQL存儲引擎MyISAM和InnoDB之間的比較

MySQL存儲引擎MyISAM和InnoDB之間的比較

? 版權聲明
THE END
喜歡就支持一下吧
點贊13 分享