MySQL启动时InnoDB引擎被禁用了的解决方法
程序员文章站
2022-06-29 14:46:45
发现问题
今天在工作中,从本地数据库复制表数据到虚拟机 centos 6.6 上的数据库时,得到提示:
unknown table engine '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
注释掉即可。
总结
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作能带来一定的帮助,如果有疑问大家可以留言交流,谢谢大家对的支持。
下一篇: IOS 数据库升级数据迁移的实例详解