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?
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With