简体   繁体   中英

How to enable INNODB in mysql

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?

You need to enable it in my.cnf file, then restart your server:

http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#option_mysqld_innodb

Or you can load an InnoDB plugin during runtime:

http://dev.mysql.com/doc/refman/5.1/en/replacing-builtin-innodb.html

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

In my.ini (located in MySQL folder) put a # sign before 'skip-innodb' to disable this command. Then restart mysql. This will enable InnoDB engine.

If your InnoDB gets disabled after a mysql-server upgrade what you have to do Initially is to set plugin-load of at server startup using

[mysqld]

plugin-load="myplugin_1=myplugin_1.so;myplugin_2=myplugin_2.so";

And then specify the pathname to the plugin_dir (plugin directory) it can be done by following changes in the my.cnf file

[mysqld]

ignore-builtin-innodb

plugin-load=innodb=ha_innodb_plugin.so

plugin_dir=/path/to/plugin/directory

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM