快被急疯了, MySQL 启动不了,始终显示“The server quit without updating PID file”

2016-08-10 06:29:45 +08:00
 Reign
昨晚睡了两个小时的觉,捣鼓了一晚上都不行,始终启动不了 MySQL

系统是 centos6.5 安装的 AMH4.2 ,昨天下午网站始终打不开,于是我想重启 MySQL ,用 amh 自带的命令: amh mysql 然后选择 restart ,但是,那个 MySQL 一直关不了,等了好久都关不了,我一时心急,做出了一个错误的决定,关机重启,重启之后, amh 的 nginx 和 php 能正常启动,就是 MySQL 一直启动不了,我用 amh mysql 命令,选择了 start ,始终显示这个错误信息:

[AMH] MySQL Management please select: (1~6)
1) start 3) restart 5) force-reload
2) stop 4) reload 6) exit

Starting MySQL.The server quit without updating PID file (/[FAILED]l/mysql/data/ns471333.eu.pid).
把网上的做饭全部试玩了都不行,比如这个帖子里面的: http://stackoverflow.com/questions/4963171/mysql-server-startup-error-the-server-quit-without-updating-pid-file

求 MySQL 高手解疑一下吧,谢谢,谢谢
-------------------------------------------------------------------------------------------------------------------------------
这是error.log信息:
160810 00:15:00 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
160810 0:15:00 [Note] Plugin 'InnoDB' is disabled.
22:15:00 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 133467 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x30000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x33)[0x838bdb3]
/usr/local/mysql/bin/mysqld(handle_fatal_signal+0x432)[0x8280302]
[0xa0af2400]
/usr/local/mysql/bin/mysqld(wait_for_free_space+0x5c)[0x837368c]
/usr/local/mysql/bin/mysqld(my_write+0x102)[0x838a602]
/usr/local/mysql/bin/mysqld(my_b_flush_io_cache+0x43a)[0x8376dfa]
/usr/local/mysql/bin/mysqld(_ZN13MYSQL_BIN_LOG21sync_purge_index_fileEv+0x20)[0x82fcc10]
/usr/local/mysql/bin/mysqld(_ZN13MYSQL_BIN_LOG4openEPKc13enum_log_typeS1_10cache_typebmbb+0xc9)[0x83027a9]
/usr/local/mysql/bin/mysqld[0x812a116]
/usr/local/mysql/bin/mysqld(_Z11mysqld_mainiPPc+0x3a1)[0x812c9d1]
/usr/local/mysql/bin/mysqld(main+0x1b)[0x8123edb]
/lib/libc.so.6(__libc_start_main+0xe6)[0xa07c7d26]
/usr/local/mysql/bin/mysqld[0x8123e21]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
160810 00:15:00 mysqld_safe mysqld from pid file /usr/local/mysql/data/ns471333.eu.pid ended
160810 00:21:36 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
160810 0:21:36 [Note] Plugin 'InnoDB' is disabled.
22:21:36 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 133467 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x30000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x33)[0x838bdb3]
/usr/local/mysql/bin/mysqld(handle_fatal_signal+0x432)[0x8280302]
[0xa52d9400]
/usr/local/mysql/bin/mysqld(wait_for_free_space+0x5c)[0x837368c]
/usr/local/mysql/bin/mysqld(my_write+0x102)[0x838a602]
/usr/local/mysql/bin/mysqld(my_b_flush_io_cache+0x43a)[0x8376dfa]
/usr/local/mysql/bin/mysqld(_ZN13MYSQL_BIN_LOG21sync_purge_index_fileEv+0x20)[0x82fcc10]
/usr/local/mysql/bin/mysqld(_ZN13MYSQL_BIN_LOG4openEPKc13enum_log_typeS1_10cache_typebmbb+0xc9)[0x83027a9]
/usr/local/mysql/bin/mysqld[0x812a116]
/usr/local/mysql/bin/mysqld(_Z11mysqld_mainiPPc+0x3a1)[0x812c9d1]
/usr/local/mysql/bin/mysqld(main+0x1b)[0x8123edb]
/lib/libc.so.6(__libc_start_main+0xe6)[0xa4faed26]
/usr/local/mysql/bin/mysqld[0x8123e21]
The manual page at http://dev.mysql.com/do160810 00:21:36 mysqld_safe mysqld from pid file /usr/local/mysql/data/ns471333.eu.pid ended
19871 次点击
所在节点    程序员
42 条回复
qiayue
2016-08-10 06:44:08 +08:00
曾经遇到过几次,按照网上搜索的办法都解决了

你看看是不是硬盘满了,然后该删的删
Reign
2016-08-10 06:46:49 +08:00
@qiayue 硬盘 2T ,剩余空间太多了
jugelizi
2016-08-10 06:54:05 +08:00
记得好几次 centos 断电重启 MySQL 服务需要删除 my.cnf 才能起来
Reign
2016-08-10 06:56:37 +08:00
@jugelizi 试了的,删了 my.cnf 还是启动不了 MySQL
gzlock
2016-08-10 06:59:14 +08:00
docker 保平安
Bardon
2016-08-10 07:56:31 +08:00
是重启的时候没有清理掉 pid file 么?
rm ns*.eu.pid 试试
再 rm *.local.err 后重启 mysql 试试
newghost
2016-08-10 08:00:37 +08:00
160810 0:15:00 [Note] Plugin 'InnoDB' is disabled.


你用的什么引擎?
wander2008
2016-08-10 08:12:32 +08:00
你可以删除上面说的 pidfile 试试。我感觉好像是权限的问题。
Reign
2016-08-10 08:27:26 +08:00
@newghost myisam
Reign
2016-08-10 08:30:02 +08:00
@wander2008 mysql 文件夹权限都-R 设置成 755 了,用户名和组都是 MySQL
davidyin
2016-08-10 08:31:04 +08:00
删掉 pid 文件,再启动 mysql 。
查看一下 pid 文件的权限。

基本就这两条。
xiaobu
2016-08-10 08:32:09 +08:00
error 日志看下,里面有提示的
blacklee
2016-08-10 08:32:18 +08:00
#6 应该是对的,至少我在 Mac 上碰到这个错误消息的时候这么处理是 OK 的。
Reign
2016-08-10 08:33:09 +08:00
@davidyin 里面就没有找到 pid 文件,我停止 MySQL 都显示: MySQL server PID file could not be found! mysql 文件夹下面全都是可写的
wander2008
2016-08-10 08:35:23 +08:00
@Reign mysql 这货文件权限好像还挺奇怪的。你看看配置文件里面的 datadir 指定到默认配置试试。还原默认配置。以前也遇到 pid 问题。
Reign
2016-08-10 08:37:14 +08:00
@Bardon 把这两个删完了都不行,还是抛出那个错误
davidyin
2016-08-10 08:38:03 +08:00
@Reign
/usr/local/mysql/data/ns471333.eu.pid
建议命令行手工安装 mysql 。
不懂 AMH 控制面板。
petelin
2016-08-10 08:40:29 +08:00
我遇到过改的是 mysql 目录权限 777 ,突然就好了,,,很诡异, mac
Reign
2016-08-10 08:49:50 +08:00
@petelin 这么做也不行
xi_lin
2016-08-10 08:57:50 +08:00
你找找你机器上有几个 my.cnf
分别看看相应的配置目录下有没有 pid 文件

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/298274

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX