如何在mysql中启用INNODB

时间:2021-06-15 07:36:37

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.

当我在MySQL中执行查询时,它返回一个错误,指出InnoDB未启用。当我点击存储引擎时,InnoDB被禁用。

How do I enable InnoDB?

如何启用InnoDB?

4 个解决方案

#1


18  

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

您需要在my.cnf文件中启用它,然后重新启动服务器:

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

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

Or you can load an InnoDB plugin during runtime:

或者您可以在运行时加载InnoDB插件:

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

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

#2


16  

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.

我遇到了类似的情况,即InnoDB在mysql-server升级后被禁用。查询“show engines”没有显示Innodb。通过此链接为我解决了问题。

    /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

#3


4  

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.

在my.ini(位于MySQL文件夹中)在'skip-innodb'之前放置#符号以禁用此命令。然后重启mysql。这将启用InnoDB引擎。

#4


0  

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

如果你的InnoDB在mysql-server升级后被禁用你必须做的事情最初是设置在服务器启动时的插件加载

[mysqld]

的[mysqld]

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

插件负载= “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

然后指定plugin_dir(插件目录)的路径名,可以通过my.cnf文件中的更改来完成

[mysqld]

ignore-builtin-innodb

plugin-load=innodb=ha_innodb_plugin.so

plugin_dir=/path/to/plugin/directory

#1


18  

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

您需要在my.cnf文件中启用它,然后重新启动服务器:

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

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

Or you can load an InnoDB plugin during runtime:

或者您可以在运行时加载InnoDB插件:

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

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

#2


16  

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.

我遇到了类似的情况,即InnoDB在mysql-server升级后被禁用。查询“show engines”没有显示Innodb。通过此链接为我解决了问题。

    /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

#3


4  

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.

在my.ini(位于MySQL文件夹中)在'skip-innodb'之前放置#符号以禁用此命令。然后重启mysql。这将启用InnoDB引擎。

#4


0  

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

如果你的InnoDB在mysql-server升级后被禁用你必须做的事情最初是设置在服务器启动时的插件加载

[mysqld]

的[mysqld]

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

插件负载= “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

然后指定plugin_dir(插件目录)的路径名,可以通过my.cnf文件中的更改来完成

[mysqld]

ignore-builtin-innodb

plugin-load=innodb=ha_innodb_plugin.so

plugin_dir=/path/to/plugin/directory