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:
I had met with this problem before i haven saw this post
All in all,thanks:)
Thanks for the solution. Worked great for me.
Thanks a lot for your post. Finally someone helped me out!
[...] 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 [...]
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
On Debian 6 this can also happen when you change the innodb_log_file_size parameter… some times mysql does not start.. but other times it just starts up bud disables innodb engine… so solution is to remove ib_logfiles from /var/lib/mysql
Your solution took care of the problem we were having as the majority of our tables have an engine innodb and the innodb_buffer_pool_size was set too low. The innodb_log_file_size changed as well. Just thank you.