首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >启用和[跳过- InnoDB ]- [ error ]插件'InnoDB‘init函数返回错误时,请使用InnoDB引擎

启用和[跳过- InnoDB ]- [ error ]插件'InnoDB‘init函数返回错误时,请使用InnoDB引擎
EN

Server Fault用户
提问于 2012-06-22 07:17:26
回答 1查看 1.6K关注 0票数 1

到目前为止,在生产服务器中,我们只使用MyIsam表运行,因此,我们已经禁用了带有skip选项的innodb引擎。但是现在,我们还需要启用now引擎来创建几个now表。因此,我们在#skip-innodb中注释了my.cnf选项并重新启动。请通过下面的案例,并要求提供任何解决方案或提示相同?

案例1:使用skip选项和"mysql>show engines“禁用innodb,如下所示。

代码语言:javascript
复制
mysql> show engines;
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine     | Support | Comment                                                        | Transactions | XA   | Savepoints |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| InnoDB     | NO      | Supports transactions, row-level locking, and foreign keys     | NULL         | NULL | NULL       |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
| BLACKHOLE  | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |
| CSV        | YES     | CSV storage engine                                             | NO           | NO   | NO         |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables      | NO           | NO   | NO         |
| FEDERATED  | NO      | Federated MySQL storage engine                                 | NULL         | NULL | NULL       |
| ARCHIVE    | YES     | Archive storage engine                                         | NO           | NO   | NO         |
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance         | NO           | NO   | NO         |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
8 rows in set (0.01 sec)

      Engine     | Support ...
    | InnoDB     | NO   ......

案例2:由于我想启用innodb,我命令#skip选项并重新启动。但是现在显示引擎甚至没有在列表中显示InnoDB引擎。?

代码语言:javascript
复制
mysql> show engines;
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine     | Support | Comment                                                        | Transactions | XA   | Savepoints |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance         | NO           | NO   | NO         |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
| BLACKHOLE  | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |
| CSV        | YES     | CSV storage engine                                             | NO           | NO   | NO         |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables      | NO           | NO   | NO         |
| FEDERATED  | NO      | Federated MySQL storage engine                                 | NULL         | NULL | NULL       |
| ARCHIVE    | YES     | Archive storage engine                                         | NO           | NO   | NO         |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
7 rows in set (0.00 sec)

Mysql版本:5.1.57-社区-日志操作系统: CentOS版本5.7 (最终)

日志:

代码语言:javascript
复制
120622 13:06:36  InnoDB: Initializing buffer pool, size = 8.0M
120622 13:06:36  InnoDB: Completed initialization of buffer pool
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/error-creating-innodb.html
120622 13:06:36 [ERROR] Plugin 'InnoDB' init function returned error.
120622 13:06:36 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120622 13:06:36 [Note] Event Scheduler: Loaded 0 events
120622 13:06:36 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.57-community-log'  socket: '/data/mysqlsnd/mysql.sock1'  port: 3307  MySQL Community Server (GPL)
EN

回答 1

Server Fault用户

发布于 2012-06-26 06:05:52

您的日志文件可以是corrupted.Try --如下所示:

  1. 停下mysql。
  2. 由于您以前在no表中没有数据,删除(或移到其他地方)日志文件,因此在默认安装时,应该将它们命名为/var/lib/mysql/ib_logfile0/var/lib/mysql/ib_logfile1
  3. 重新启动mysql

要显示mysql innodb引擎状态,请键入以下内容

代码语言:javascript
复制
mysql> show engine innodb status;
票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/401216

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档