- 起因:部署在服务器的项目长时间未访问报错
- 分析:数据库自动关闭造成的 参考链接
- 解决:
查看所有tcp端口,确认mysql状态:netstat -ntlp
重启mysql :service mysql start
1)问题1 重启中出现
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
2)定位错误
tail /var/log/mysql/error.log
Cannot allocate memory for the buffer pool
Plugin initialization aborted with error Generic error.
3)解决方法:参考链接