mysql启动失败Starting MySQL.The server quit without updating PID file ([失败]ysqllnmp.pid)

在尝试启动MySQL时遇到错误:'Starting MySQL. The server quit without updating PID file ([失败]ysqllnmp.pid)'。检查日志发现是由于数据库未正常关闭导致的崩溃恢复过程,以及PID文件权限问题。通过删除/data/mysql中的内容并调整配置文件中log_file和buffer_pool_size的大小解决了问题。内存不足也可能导致此启动失败。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

mysql启动失败Starting MySQL.The server quit without updating PID file ([失败]ysqllnmp.pid)
mysql启动时候报Starting MySQL.The server quit without updating PID file ([失败]ysqllnmp.pid
一开始以为没有给/data/mysql的文件夹写入的权限,后来干脆给777的权限,但是启动还是报错,最后查看日志
InnoDB: the log sequence number in the ib_logfiles!
161126 17:30:58 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files…
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer…
161126 17:30:58 InnoDB: Waiting for the background threads to start
161126 17:30:59 InnoDB: 1.1.8 started; log sequence number 1595916
161126 17:30:59 [Note] Server hostname (bind-address): ‘0.0.0.0’; port: 3306
161126 17:30:59 [Note] - ‘0.0.0.0’ resolves to ‘0.0.0.0’;
161126 17:30:59 [Note] Server socket created on IP: ‘0.0.0.0’.
161126 17:30:59 [ERROR] /usr/local/mysql/bin/mysqld: Can’t create/write to file ‘/usr/local/mysql/data/lnmp.pid’ (Errcode: 13)
161126 17:30:59 [ERROR] Can’t start server: can’t create PID file: Permission denied
161126 17:30:59 mysqld_safe mysqld from pid file /usr/local/mysql/data/lnmp.pid ended
161126 17:38:50 mysqld_safe Starting mysqld daemon with databases from /data/mysql
161126 17:38:50 InnoDB: The InnoDB memory heap is disabled
161126 17:38:50 InnoDB: Mutexes and rw_locks use GCC atomic builtins
161126 17:38:50 InnoDB: Compressed tables use zlib 1.2.3
161126 17:38:50 InnoDB: Initializing buffer pool, size = 128.0M
161126 17:38:50 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file ./ib_logfile0 is of different size 0 10485760 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
161126 17:38:50 [ERROR] Plugin ‘InnoDB’ init function returned error.
161126 17:38:50 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
161126 17:38:50 [ERROR] Unknown/unsupported storage engine: InnoDB
161126 17:38:50 [ERROR] Aborting

161126 17:38:50 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

161126 17:38:50 mysqld_safe mysqld from pid file /data/mysql/lnmp.pid ende
并不是说没有写入的权限,,后来讲/data/mysql中的
旧的二进制文件
全部删除,再启动mysql就可以了
重新启动mysql服务,就会重新生成二进制文件

引起这个问题的还有一个是内存不足,需要查看下/etc/my.cnf中的[mysqld]的配置
修改配置文件

原先 设置的log_file的大小是1G,buffer_pool_size 是4G,现在换成小点的,就可以了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值