您的位置:首页 > 数据库 > MySQL

关于本站Mysql数据库最近挂掉的记录

2015-11-19 00:00 501 查看
最近虽然访问的人数不多,但是数据库还是经常会死掉,也忙于工作和学习没有仔细考虑和排查究竟是哪里的问题 现在将出现的问题及解决的方法记录如下

1、问题log

140703 9:57:02 [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. 140703 9:57:02 [Note] Plugin 'FEDERATED' is disabled. 140703 9:57:02 InnoDB: The InnoDB memory heap is disabled 140703 9:57:02 InnoDB: Mutexes and rw_locks use GCC atomic builtins 140703 9:57:02 InnoDB: Compressed tables use zlib 1.2.3.4 140703 9:57:02 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 140703 9:57:02 InnoDB: Completed initialization of buffer pool 140703 9:57:02 InnoDB: Fatal error: cannot allocate memory for the buffer pool 140703 9:57:02 [ERROR] Plugin 'InnoDB' init function returned error. 140703 9:57:02 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140703 9:57:02 [ERROR] Unknown/unsupported storage engine: InnoDB 140703 9:57:02 [ERROR] Aborting 140703 9:57:02 [Note] /usr/sbin/mysqld: Shutdown complete


2、解决办法 ①修改数据库的默认引擎,改InnoDB为MyISAM

vi /etc/mysql/my.cnf


在[mysqld]下添加

default-storage-engine=MyISAM


更新对应数据库的数据引擎 我的具体做法比较笨,先把数据导出,新建数据库,重新初始化并导入到网站数据库内,这个过程比较没效率
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql死掉 网站