Home >Database >Mysql Tutorial >What should I do if the InnoDB engine is disabled when MySQL starts?

What should I do if the InnoDB engine is disabled when MySQL starts?

小云云
小云云Original
2017-12-25 13:29:491343browse

What should I do if the InnoDB engine is disabled when MySQL starts? Recently I encountered a problem at work, and now I will share the solution for everyone’s reference and study. The following article mainly introduces to you the solution to the problem that the InnoDB engine is disabled when MySQL is started. Friends who need it can follow the steps below. Let’s learn together. Hope it helps everyone.

Discover the problem

Today at work, when copying table data from the local database to the database on the virtual machine CentOS 6.6, I got the prompt:

Unknown table engine 'InnoDB'

So in the server MySQL Checked the engine:

mysql> show engines\G

Got:

*************************** 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)

Supports in InnoDB is NO

Solution

Edit my.cnf

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

Change innodb = OFF to innodb = ON

At the same time, comment out skip-innodb.

Related recommendations:

Comparison between MySQL storage engine MyISAM and InnoDB

Introduction to innoDB lock in mysql

Detailed analysis of the differences between MySQL InnoDB and MyISAM data engines

The above is the detailed content of What should I do if the InnoDB engine is disabled when MySQL starts?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn