Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL unknown table engine innodb

I am trying to migrate a test website on drupal onto a live server on Amazon ec2. I migrated the database using phpmyadmin, and tried to access the site. I got this error:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1286 Unknown table engine 'InnoDB': SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 167 of /var/www/includes/lock.inc).

I believe the problem here is that MySQL doesn't have InnoDB. I have looked through the my.cnf file and there is no line that says skip-innodb.

I have tried show engines and it showed a bunch of engines but not innodb. I have tried restarting my server and deleting the logfile, just like has been suggested previously, but that didn't work.

Maybe what needs to be done is to somehow install the Innodb engine. Could you tell me how I may do that?

like image 539
BBB Avatar asked Mar 20 '26 03:03

BBB


1 Answers

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 and restart mysql

like image 73
Mandeep Singh Brar Avatar answered Mar 22 '26 14:03

Mandeep Singh Brar