MYsql经常无缘无故关闭,之后无法重新启动

MYsql经常无缘无故关闭,之后无法重新启动,mysql,error-handling,Mysql,Error Handling,上面是mysql错误日志,有时候mysql会崩溃,我想重新启动服务,它将无法启动,错误是这样的 “未知实例”错误 任何人都知道上面的错误是关于什么以及如何解决它,我尝试了谷歌,但似乎找不到答案 谢谢我自己在搜索答案时发现了这个问题,我的服务器的/var/log/mysql/error.log的语句与您的非常相似。运行dmesg | tail-20揭示了罪魁祸首:操作系统内存不足并杀死了mysqld: 150505 16:57:01 mysqld_safe mysqld from pid file

上面是mysql错误日志,有时候mysql会崩溃,我想重新启动服务,它将无法启动,错误是这样的 “未知实例”错误

任何人都知道上面的错误是关于什么以及如何解决它,我尝试了谷歌,但似乎找不到答案


谢谢

我自己在搜索答案时发现了这个问题,我的服务器的
/var/log/mysql/error.log
的语句与您的非常相似。运行
dmesg | tail-20
揭示了罪魁祸首:操作系统内存不足并杀死了
mysqld

150505 16:57:01 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
150505 16:58:01 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150505 16:58:01 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
150505 16:58:01 [Note] Plugin 'FEDERATED' is disabled.
150505 16:58:01 InnoDB: The InnoDB memory heap is disabled
150505 16:58:01 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150505 16:58:01 InnoDB: Compressed tables use zlib 1.2.8
150505 16:58:01 InnoDB: Using Linux native AIO
150505 16:58:01 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
150505 16:58:01 InnoDB: Completed initialization of buffer pool
150505 16:58:01 InnoDB: Fatal error: cannot allocate memory for the buffer pool
150505 16:58:01 [ERROR] Plugin 'InnoDB' init function returned error.
150505 16:58:01 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
150505 16:58:01 [ERROR] Unknown/unsupported storage engine: InnoDB
150505 16:58:01 [ERROR] Aborting

现在要弄清楚为什么在这台更新的服务器上内存耗尽了,它的RAM是正在更换的服务器的两倍,而这台服务器从来没有这样做过…

您有足够的可用RAM/交换空间吗?您可以尝试将innodb_buffer_pool_大小减少到64 MB。
[835661.446277] Out of memory: Kill process 1024 (mysqld) score 91 or sacrifice child
[835661.446912] Killed process 1024 (mysqld) total-vm:901544kB, anon-rss:92332kB, file-rss:0kB
[835661.488337] init: mysql main process (1024) killed by KILL signal