Linux MySql 启用InnoDB

一、备份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


猜你喜欢

转载自blog.csdn.net/moqidian/article/details/37878781