服务器之家:专注于服务器技术及软件下载分享
分类导航

Mysql|Sql Server|Oracle|Redis|MongoDB|PostgreSQL|Sqlite|DB2|mariadb|

服务器之家 - 数据库 - Mysql - MySQL启动时InnoDB引擎被禁用了的解决方法

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

2020-08-05 16:43黄棣-dee Mysql

最近在工作中遇到一个问题,现将解决的方法分享出来供大家参考学习,下面这篇文章主要给大家介绍了关于MySQL启动时InnoDB引擎被禁用了的解决方法,需要的朋友们下面跟着小编来一起学习学习吧。

发现问题

今天在工作中,从本地数据库复制表数据到虚拟机 CentOS 6.6 上的数据库时,得到提示:

?
1
Unknown table engine 'InnoDB'

于是在服务器 MySQL 中查看了引擎:

?
1
mysql> show engines\G

得到:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
*************************** 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

?
1
[root@localhost mysql]# vim /etc/my.cnf

把其中 innodb = OFF 改为 innodb = ON

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

总结

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

原文链接:http://www.cnblogs.com/dee0912/p/5205849.html

延伸 · 阅读

精彩推荐