一、备份my.cnf
cp /etc/my.cnf /etc/my.cnf.bak
二、修改my.cnf
[mysqld] 后加入
vi my.cnf
default-storage-engine=InnoDB
将skip-innodb这行注释(加上#)
三、删除/mysql/data目录下的ib_logfile0,ib_logfile1
否则在启动mysql时会遇到下述错误:
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Unknown/unsupported table type: InnoDB
[ERROR] Aborting
四、 重启mysql
service mysqld restart