欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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

程序员文章站 2023-11-18 18:35:10
发现问题 今天在工作中,从本地数据库复制表数据到虚拟机 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 注释掉即可。

总结

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