Unknown table engine ‘InnoDB’

I was getting the error “ERROR 1286 (42000): Unknown table engine ‘InnoDB’” when trying to create/alter tables with the InnoDB engine. You can check for this warning by issuing the create or alter statements and then running

show warnings;
in the same mysql client session.

Check if you have InnoDB support enabled:

mysql> show variables like ‘have_innodb’; +—————+———-+ | Variable_name | Value    | +—————+———-+ | have_innodb   | DISABLED | +—————+———-+

The problem is that InnoDB is not enabled by default in Debian distributions of my.cnf.  To enable it, simply comment the following lines under the [mysqld] section.

#skip-innodb

Related posts:

  1. WordPress database error: [Table 'wp_terms' doesn't exist]
  2. MogileFS HOWTO
  3. PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0

5 comments

  1. easyQuery says:

    I had met with this problem before i haven saw this post

    All in all,thanks:)

  2. isa says:

    Thanks for the solution. Worked great for me.

  3. Thanks a lot for your post. Finally someone helped me out!

  4. [...] was present. I googled for “Unknown table engine Innodb” and came across the following thread. While this made sense it had no effect for me as skip-innodb wasn’t present in the my.cnf [...]

  5. Ryan Day says:

    this can also be triggered if you change your mysql tmp dir to a directory that does not have correct permissions.

    the return of the query mentioned above changes to
    mysql> show variables like ‘have_innodb’;
    +—————+——-+
    | Variable_name | Value |
    +—————+——-+
    | have_innodb | NO |
    +—————+——-+

    the return of “show engines;” will not have innodb listed as the error states.

    in this case we ran out of space on the root partition due to the slow query log… dont ask, and as an after thought moved the data dir and the tmp dir to another mount.

    i solved this by cleaning out the root partition and pointing the tmp dir back to /tmp

Leave a Reply

Your email address will not be published. Required fields are marked *

*