当前位置: 移动技术网 > IT编程>数据库>Mysql > MySQL启动时InnoDB引擎被禁用了的解决方法

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

2017年12月07日  | 移动技术网IT编程  | 我要评论
发现问题 今天在工作中,从本地数据库复制表数据到虚拟机 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 注释掉即可。

总结

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

如您对本文有疑问或者有任何想说的,请 点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网