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

2022-05-22 0 481

发现问题

今天在工作中,从本地数据库复制表数据到虚拟机 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 注释掉即可。

总结

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

免责声明:
1、本网站所有发布的源码、软件和资料均为收集各大资源网站整理而来;仅限用于学习和研究目的,您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。 不得使用于非法商业用途,不得违反国家法律。否则后果自负!

2、本站信息来自网络,版权争议与本站无关。一切关于该资源商业行为与www.niceym.com无关。
如果您喜欢该程序,请支持正版源码、软件,购买注册,得到更好的正版服务。
如有侵犯你版权的,请邮件与我们联系处理(邮箱:skknet@qq.com),本站将立即改正。

NICE源码网 MySql MySQL启动时InnoDB引擎被禁用了的解决方法 https://www.niceym.com/53635.html