Configuring MySQL my.cnf for MyISAM and InnoDB

innodbmyisamMySQL

I want to convert some (not all) the MyISAM tables to InnoDB.

What would be the best configuration? (need to add InnoDB settings, because there are no InnoDB settings in my my.cnf).

show engines

Best Answer

You mentioned before you are running

  • MySQL 5.5.29
  • 16 GB RAM

Here are some good settings to start with

innodb_buffer_pool_size=4G
innodb_buffer_pool_instance=2
innodb_read_io_threads=12
innodb_write_io_threads=12
innodb_io_capacity=300
innodb_log_file_size=128M

Don't do the conversion yet !!!

Put there settings in my.cnf, then do the following

service mysql stop
cd /var/lib/mysql
rm -f ibdata1 ib_logfile*
service mysql start

Now, you can do the conversion.

Give it a Try !!!

UPDATE 2013-05-10 10:44 EDT

Here are my past posts on tuning InnoDB for better CPU usage

Here are my past posts on tuning InnoDB