Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable INNODB in mysql

Tags:

When I execute a query in MySQL it returns an error saying that InnoDB is not enabled. When I clicked the storage engine, the InnoDB was disabled.

How do I enable InnoDB?

like image 307
Shahid Karimi Avatar asked Jan 21 '11 10:01

Shahid Karimi


People also ask

How do I know if InnoDB is enabled?

The easiest way to check whether the InnoDB engine is enabled is to log in to phpMyAdmin, click the SQL tab, type the following command in the box: show engines; and click Go to execute the query and see the available storage engines. Next to InnoDB engine, in the Support row you will see Yes if InnoDB is enabled.

Does MySQL support InnoDB?

InnoDB is a general-purpose storage engine that balances high reliability and high performance. In MySQL 5.6, InnoDB is the default MySQL storage engine. Unless you have configured a different default storage engine, issuing a CREATE TABLE statement without an ENGINE clause creates an InnoDB table.

How do I enable InnoDB in Cpanel?

To enable it, ssh to your server as root and open file /etc/my. cnf with your favorite editor. Search for line skip-innodb and comment the line by placing # in the starting of the line. Save and quit the file and restart mysql service for changes to take effect.


1 Answers

I faced a similar situation where InnoDB got disabled after a mysql-server upgrade. The query "show engines" didn't display Innodb. Following this link fixed the issue for me.

    /etc/init.d/mysql stop      cd /var/lib/mysql/      ls ib_logfile*     mv ib_logfile0 ib_logfile0.bak     mv ib_logfile1 ib_logfile1.bak      /etc/init.d/mysql restart 
like image 194
reynold Avatar answered Oct 18 '22 07:10

reynold