Recently changed servers and went from CentOS 5.8 to CentOS 6.4. I installed MySQL 5.1.69 on my new server, and manually swapped /var/lib/mysql. I am not sure what version of MySQL was on my old server, but would expect it to be the same.
When I try to query a table, I get the following:
ERROR 1286 (42000): Unknown table engine 'InnoDB'
Tables which don't use InnoDB work fine. Looks like I don't have InnoDB loaded. I installed MySQL using yum install mysql mysql-server
. Why is InnoDB not loaded, and how should I load it?
EDIT:
Maybe I should manually change ib_logfile0 to have the file size the same?
mysql> SHOW ENGINES;
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
4 rows in set (0.00 sec)
mysql>
/var/log/mysqld.log:
130622 17:05:19 [Note] /usr/libexec/mysqld: Shutdown complete
130622 17:05:19 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
130622 17:06:09 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130622 17:06:09 InnoDB: Initializing buffer pool, size = 8.0M
130622 17:06:09 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
130622 17:06:09 [ERROR] Plugin 'InnoDB' init function returned error.
130622 17:06:09 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
130622 17:06:09 [Note] Event Scheduler: Loaded 0 events
130622 17:06:09 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.69' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution