Fixing MySQL InnoDB problems on Gentoo

For some reason, transactions weren’t working on my MySQL installation on my Gentoo server, despite me creating the tables as InnoDB tables. I poked around and discovered that InnoDB wasn’t enabled for some reason, so I figured upgrading MySQL should do the trick. So I went ahead and upgraded my version to 5.0.40 and I got the following great error:

InnoDB: Error: ib_logfiles are too small for innodb_thread_concurrency 8.
InnoDB: The combined size of ib_logfiles should be bigger than
InnoDB: 200 kB * innodb_thread_concurrency.
InnoDB: To get mysqld to start up, set innodb_thread_concurrency in my.cnf
InnoDB: to a lower value, for example, to 8. After an ERROR-FREE shutdown
InnoDB: of mysqld you can adjust the size of ib_logfiles, as explained in
InnoDB: http://dev.mysql.com/doc/refman/5.0/en/adding-and-removing.html
InnoDB: Cannot continue operation. Calling exit(1).

After doing a number of things including deleting the databases (I don’t have anything important in it at the moment, just for testing) and rebuilding them and other weirdness, its turns out all I needed to do was increase innodb_log_file_size to 2M from 1M and it was fine. So thats ok, and that error went away… in retrospect, it seems like an obvious solution. Very annoying that it wasn’t set to that by default.

But still “SHOW VARIABLES LIKE ‘have_innodb'” is showing DISABLED. So InnoDB is still not enabled. So to fix this thing, I go back in and rm -rf /var/lib/mysql , and then run emerge –config =dev-db/mysql-5.0.40… and when I log back into the mysql console, it works. Seriously, wtf?

Conclusion: InnoDB is a picky thing. Make sure your config is correct.

Leave a Reply