小标
2018-08-17
来源 :
阅读 6212
评论 0
摘要:本文主要向大家介绍了MySQL数据库之mysql 有报错 ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists ,通过具体的内容向大家展现,希望对大家学习MySQL数据库有所帮助。
本文主要向大家介绍了MySQL数据库之mysql 有报错 ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists ,通过具体的内容向大家展现,希望对大家学习MySQL数据库有所帮助。
sh-4.1# /etc/init.d/mysqld status
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
sh-4.1# /etc/init.d/mysqld start
Starting MySQL. ERROR! The server quit without updating PID file (/data1/mysql/mysql.pid).
sh-4.1# rm mysql
sh-4.1# /etc/init.d/mysqld status
ERROR! MySQL is not running
sh-4.1# /etc/init.d/mysqld start
Starting MySQL. ERROR! The server quit without updating PID file (/data1/mysql/mysql.pid).
看了一下mysql的日志有如下错误:
170104 9:44:06 [Note] /apps/mysql-5.5.38/bin/mysqld: Shutdown complete
170104 09:44:06 mysqld_safe mysqld from pid file /data1/mysql/mysql.pid ended
170104 09:46:12 mysqld_safe Starting mysqld daemon with databases from /data1/mysql/
170104 9:46:12 [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.
170104 9:46:12 [Note] Plugin ‘FEDERATED‘ is disabled.
170104 9:46:12 InnoDB: The InnoDB memory heap is disabled
170104 9:46:12 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170104 9:46:12 InnoDB: Compressed tables use zlib 1.2.3
170104 9:46:12 InnoDB: Using Linux native AIO
170104 9:46:12 InnoDB: Initializing buffer pool, size = 2.0G
InnoDB: mmap(2197815296 bytes) failed; errno 12
170104 9:46:12 InnoDB: Completed initialization of buffer pool
170104 9:46:12 InnoDB: Fatal error: cannot allocate memory for the buffer pool
170104 9:46:12 [ERROR] Plugin ‘InnoDB‘ init function returned error.
170104 9:46:12 [ERROR] Plugin ‘InnoDB‘ registration as a STORAGE ENGINE failed.
170104 9:46:12 [ERROR] Unknown/unsupported storage engine: InnoDB
170104 9:46:12 [ERROR] Aborting
170104 9:46:12 [Note] /apps/mysql-5.5.38/bin/mysqld: Shutdown complete
170104 09:46:12 mysqld_safe mysqld from pid file /data1/mysql/mysql.pid ended
从err日志,可以看出,我分配的Initializing buffer pool, size = 2.0G,使得机器无法初始化。导致mysql启动不起来。这个值=>my.cnf的innodb_buffer_pool_size
sh-4.1# grep "innodb-buffer-pool-size" /etc/my.cnf
innodb-buffer-pool-size = 1G
#innodb-buffer-pool-size = 2G
问题解决启动成功!!!!
本文由职坐标整理并发布,希望对同学们学习MySQL有所帮助,更多内容请关注职坐标数据库MySQL数据库频道!
喜欢 | 0
不喜欢 | 0
您输入的评论内容中包含违禁敏感词
我知道了

请输入正确的手机号码
请输入正确的验证码
您今天的短信下发次数太多了,明天再试试吧!
我们会在第一时间安排职业规划师联系您!
您也可以联系我们的职业规划师咨询:
版权所有 职坐标-一站式AI+学习就业服务平台 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
沪公网安备 31011502005948号