电脑疯子技术论坛|电脑极客社区

微信扫一扫 分享朋友圈

已有 1897 人浏览分享

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

[复制链接]
1897 0
发现问题
今天在工作中,从本地数据库复制表数据到虚拟机 CentOS 6.6 上的数据库时,得到提示:
Unknown table engine 'InnoDB'
于是在服务器 MySQL 中查看了引擎:

  1. mysql> show engines\G
复制代码


得到:

  1. *************************** 1. row ***************************
  2.   Engine: MyISAM
  3.   Support: DEFAULT
  4.   Comment: MyISAM storage engine
  5. Transactions: NO
  6.    XA: NO
  7. Savepoints: NO
  8. *************************** 2. row ***************************
  9.   Engine: CSV
  10.   Support: YES
  11.   Comment: CSV storage engine
  12. Transactions: NO
  13.    XA: NO
  14. Savepoints: NO
  15. *************************** 3. row ***************************
  16.   Engine: MEMORY
  17.   Support: YES
  18.   Comment: Hash based, stored in memory, useful for temporary tables
  19. Transactions: NO
  20.    XA: NO
  21. Savepoints: NO
  22. *************************** 4. row ***************************
  23.   Engine: BLACKHOLE
  24.   Support: YES
  25.   Comment: /dev/null storage engine (anything you write to it disappears)
  26. Transactions: NO
  27.    XA: NO
  28. Savepoints: NO
  29. *************************** 5. row ***************************
  30.   Engine: MRG_MYISAM
  31.   Support: YES
  32.   Comment: Collection of identical MyISAM tables
  33. Transactions: NO
  34.    XA: NO
  35. Savepoints: NO
  36. *************************** 6. row ***************************
  37.   Engine: PERFORMANCE_SCHEMA
  38.   Support: YES
  39.   Comment: Performance Schema
  40. Transactions: NO
  41.    XA: NO
  42. Savepoints: NO
  43. *************************** 7. row ***************************
  44.   Engine: ARCHIVE
  45.   Support: YES
  46.   Comment: Archive storage engine
  47. Transactions: NO
  48.    XA: NO
  49. Savepoints: NO
  50. *************************** 8. row ***************************
  51.   Engine: FEDERATED
  52.   Support: NO
  53.   Comment: Federated MySQL storage engine
  54. Transactions: NULL
  55.    XA: NULL
  56. Savepoints: NULL
  57. *************************** 9. row ***************************
  58.   Engine: InnoDB
  59.   Support: NO
  60.   Comment: Supports transactions, row-level locking, and foreign keys
  61. Transactions: NULL
  62.    XA: NULL
  63. Savepoints: NULL
  64. rows in set (0.00 sec)
复制代码


在 InnoDB 的 Supports 为 NO

解决方法

编辑 my.cnf

  1. [root@localhost mysql]# vim /etc/my.cnf
复制代码


把其中 innodb = OFF 改为 innodb = ON

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

总结

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


您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

关注

0

粉丝

9021

主题
精彩推荐
热门资讯
网友晒图
图文推荐

Powered by Pcgho! X3.4

© 2008-2022 Pcgho Inc.