我在my.cnf下打开了所有关于innodb的注释,启动都正常,只是在查询的时候报错:
nested exception is com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown table engine 'InnoDB'mysql日志如下:
120208  9:01:02 [ERROR] Plugin 'InnoDB' init function returned error.
120208  9:01:02 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.登陆到mysql里,输入show engines显示没有innodb引擎: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)在哪里添加呢?

解决方案 »

  1.   

    奇怪啊!我把innodb相关的内容都注释#了,show engines的时候居然有innodb!!?这是为什么????mysql> show engines;
    +------------+---------+----------------------------------------------------------------+--------------+------+------------+
    | Engine     | Support | Comment                                                        | Transactions | XA   | Savepoints |
    +------------+---------+----------------------------------------------------------------+--------------+------+------------+
    | InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys     | YES          | YES  | YES        |
    | 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.00 sec)
    启动日志:120208  9:23:31  InnoDB: Initializing buffer pool, size = 8.0M
    120208  9:23:31  InnoDB: Completed initialization of buffer pool
    120208  9:23:31  InnoDB: Started; log sequence number 0 936039谁能解释一下??????????
      

  2.   

    如果你把skip-innodb 这个选项注视掉  当然就是可以用innodb了
      

  3.   

    linux下的my.cnf是没有skip-innodb这个选项滴。所以是不是刚开启innodb就也跟着启动了那我把注释都拿掉的话,为什么反而出错了呢?