修改了mysql配置文件my.cnf中的innodb_flush_log_at_trx_commit(原来没有这一项),重启后报错,然后把此项去掉后,innodb却不能加载,导致网站不能访问。日志中报错
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
从网站后台查看是:Syntax error or access violation: 1286 Unknown table engine 'InnoDB'。
进mysql中用show plugins;看不到innodb。
修改innodb_log_file_size后,要是出现上述问题,解决方法也是一样。
解决办法是移除mysql数据库目录下的ib_logfile0, ib_logfile1。
转载于:https://blog.51cto.com/liuqs/1195620