错误现象:
/etc/init.d/mysqlsev restart
ERROR! MySQL server PID file could not be found!
Starting MySQL. ERROR! The server quit without updating PID file (/usr/local/mysql/data/mysql.pid).
查看错误日志文件:
2016-12-21 15:50:45 16977 [Note] Plugin 'FEDERATED' is disabled.
2016-12-21 15:50:45 16977 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-12-21 15:50:45 16977 [Note] InnoDB: The InnoDB memory heap is disabled
2016-12-21 15:50:45 16977 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-12-21 15:50:45 16977 [Note] InnoDB: Memory barrier is not used
解决办法:
删除ib_logfile0 ib_logfile1 文件
重启mysql服务。
注:my.cnf文件配错了,也会出现这样的问题,查看错误日志即可发现哪个参数配错了。
参考文档:http://cocos.iteye.com/blog/1089551