MySQL启动时InnoDB引擎被禁用了的解决方法

时间:2021-05-24

发现问题

今天在工作中,从本地数据库复制表数据到虚拟机 CentOS 6.6 上的数据库时,得到提示:

Unknown table engine 'InnoDB'

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

mysql> show engines\G

得到:

*************************** 1. row *************************** Engine: MyISAM Support: DEFAULT Comment: MyISAM storage engineTransactions: NO XA: NO Savepoints: NO*************************** 2. row *************************** Engine: CSV Support: YES Comment: CSV storage engineTransactions: NO XA: NO Savepoints: NO*************************** 3. row *************************** Engine: MEMORY Support: YES Comment: Hash based, stored in memory, useful for temporary tablesTransactions: 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 tablesTransactions: NO XA: NO Savepoints: NO*************************** 6. row *************************** Engine: PERFORMANCE_SCHEMA Support: YES Comment: Performance SchemaTransactions: NO XA: NO Savepoints: NO*************************** 7. row *************************** Engine: ARCHIVE Support: YES Comment: Archive storage engineTransactions: NO XA: NO Savepoints: NO*************************** 8. row *************************** Engine: FEDERATED Support: NO Comment: Federated MySQL storage engineTransactions: NULL XA: NULL Savepoints: NULL*************************** 9. row *************************** Engine: InnoDB Support: NO Comment: Supports transactions, row-level locking, and foreign keysTransactions: NULL XA: NULL Savepoints: NULLrows in set (0.00 sec)

在 InnoDB 的 Supports 为 NO

解决方法

编辑 my.cnf

[root@localhost mysql]# vim /etc/my.cnf

把其中 innodb = OFF 改为 innodb = ON

同时把 skip-innodb 注释掉即可。

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作能带来一定的帮助,如果有疑问大家可以留言交流,谢谢大家对的支持。

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章