Acabo de añadir las siguientes líneas en /etc/mysql/my.cnf después de convertir una base de datos para utilizar el motor InnoDB.
innodb_buffer_pool_size = 2560M
innodb_log_file_size = 256M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 2
innodb_thread_concurrency = 16
innodb_flush_method = O_DIRECT
Pero se produce "ERROR 2013 (HY000) en la línea 2: Lost connection to MySQL server during query" error al reiniciar mysqld. Y el registro de errores de mysql muestra lo siguiente
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 268435456 bytes!
100118 20:52:52 [ERROR] Plugin 'InnoDB' init function returned error.
100118 20:52:52 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
100118 20:52:52 [ERROR] Unknown/unsupported table type: InnoDB
100118 20:52:52 [ERROR] Aborting
Así que comenté esta línea
# innodb_log_file_size = 256M
Y reinició mysql con éxito.
Me pregunto qué es el "5242880 bytes de archivo de registro" que aparece en el error de mysql. Es la primera base de datos en el motor InnoDB en este servidor, así que ¿cuándo y dónde se crea ese archivo de registro? En este caso, ¿cómo puedo habilitar la directiva innodb_log_file_size en my.cnf?
EDITAR
He intentado borrar /var/lib/mysql/ib_logfile0 y reiniciar mysqld pero sigue fallando. Ahora muestra lo siguiente en el registro de errores.
100118 21:27:11 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 256 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100 200
InnoDB: Error: log file ./ib_logfile1 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 268435456 bytes!
Resolución
Ahora funciona después de borrar tanto ib_logfile0 como ib_logfile1 en /var/lib/mysql