MySQL启动报【The server quit without updating PID file】错误的解决过程
来源:互联网 发布:恩牛网络怎么样 编辑:程序博客网 时间:2024/05/18 02:58
1.凌乱的错误过程
MySQL启动时,一会儿报如下错误:
MySQL ERROR! The server quit without updating PID file
mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
一会又报其他错误:
The server quit without updating PID file (/var/run/mysqld/mysqld.pid). ```看errlog又出现其他错误:
[Note] Plugin ‘FEDERATED’ is disabled.
/usr/sbin/mysqld: Table ‘mysql.plugin’ doesn’t exist
170220 14:19:39 [ERROR] Can’t open the mysql.plugin table. Please run mysql_upgrade to create it.
查看errlog和配置文件的方法:> mysqld --verbose --help | grep cnf
07:02:57 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=10
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 = 24179 K bytes of memory
Hope that’s ok; if not, decrease some variables in the equation.
Thread pointer: 0x7fff4460d950
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 = 7fff4460d420 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x20)[0x7fc13eedbeb0]
/usr/sbin/mysqld(handle_fatal_signal+0x3d5)[0x7fc13edc51f5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7fc13db53330]
/usr/sbin/mysqld(_Z18ha_resolve_by_nameP3THDPK19st_mysql_lex_string+0x63)[0x7fc13edc69f3]
/usr/sbin/mysqld(_Z14open_table_defP3THDP11TABLE_SHAREj+0x28f5)[0x7fc13ed56c85]
/usr/sbin/mysqld(_Z15get_table_shareP3THDP10TABLE_LISTPcjjPij+0x1a2)[0x7fc13eca6b92]
/usr/sbin/mysqld(_Z10open_tableP3THDP10TABLE_LISTP11st_mem_rootP18Open_table_context+0x465)[0x7fc13ecae1e5]
/usr/sbin/mysqld(_Z11open_tablesP3THDPP10TABLE_LISTPjjP19Prelocking_strategy+0x551)[0x7fc13ecb0041]
/usr/sbin/mysqld(_Z20open_and_lock_tablesP3THDP10TABLE_LISTbjP19Prelocking_strategy+0x3c)[0x7fc13ecb075c]
/usr/sbin/mysqld(+0x271311)[0x7fc13ec59311]
/usr/sbin/mysqld(_Z11plugin_initPiPPci+0x8a2)[0x7fc13ecef4f2]
/usr/sbin/mysqld(+0x28b48b)[0x7fc13ec7348b]
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x45b)[0x7fc13ec782fb]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fc13d195f45]
/usr/sbin/mysqld(+0x287068)[0x7fc13ec6f068]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): is an invalid pointer
Connection ID (thread ID): 0
Status: NOT_KILLED
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.
“`
2.解决过程(1):
一路google都找不到解决方法,只能重新初始化MySQL了!!!
重新创建:
mysqld –initialize –user=mysql –basedir=/usr/local/mysql –datadir=/home/mysql
等同于:
mysql_install_db –user=mysql –basedir=/opt/mysql/mysql –datadir=/opt/mysql/mysql/data
3.解决过程(2):
重新初始化后可以启动但是拿不到root密码,登录不进去,于是用skip-grant-tables
不加载权限的方式启动,然后修改root密码:
/usr/local/mysql/bin/mysqld –basedir=/usr/local/mysql –datadir=/usr/local/mysql/var2 –plugin-dir=/usr/local/mysql/lib/plugin –user=mysql –log-error=/var/log/mysql.log –open-files-limit=65535 –pid-file=/usr/local/mysql/var2/ubuntu.pid –socket=/tmp/mysql.sock –port=3306 –skip-grant-tables
4.原因与反思
最后有个配置文件设置了myisam-recover
myisam-recover = BACKUP
最后发现根源是操作系统未安全关机,MySQL未能安全关闭,而系统表是用myisam引擎的,myisam不支持崩溃修复损坏,然后导致系统表损坏,而启动又检查myisam-recover
,无法recover就无法启动了。
结论:虽然使用MySQL都强烈使用innodb引擎,但是系统表确是使用myisam.这个问题被折腾了一天,耗时太久,也说明自己对MySQL的不熟悉,尤其对于MySQL启动恢复部分,还有很长的一段路要走,多学习。
- MySQL启动报【The server quit without updating PID file】错误的解决过程
- MySql启动出现The server quit without updating PID file错误解决过程
- MYSQL启动后报:ERROR! The server quit without updating PID file错误的问题解决
- MYSQL启动后报:ERROR! The server quit without updating PID file错误的问题解决
- MYSQL启动后报:ERROR! The server quit without updating PID file错误的问题解决
- MYSQL启动后报:ERROR! The server quit without updating PID file错误的问题解决
- MYSQL启动后报:ERROR! The server quit without updating PID file错误的问题解决
- MYSQL启动后报:ERROR! The server quit without updating PID file错误的问题解决
- 解决mysql启动时报The server quit without updating PID file 的错误
- 解决mysql启动时报The server quit without updating PID file 的错误
- MYSQL启动后报:ERROR! The server quit without updating PID file错误
- MySql 启动报错:The server quit without updating PID file 如何解决
- Linux中mysql无法启动 报错 the server quit without updating PID file的解决方法
- CentOS 启动mysql的时候发生的错误 The server quit without updating PID file(…)
- 新安装的mysql,启动时候出现错误 The server quit without updating pid file
- mysql启动报错 The server quit without updating PID file (/[FAILED]ql/cc.pid).
- mysql启动不了,the server quit without updating PID file
- 启动mysql出现The server quit without updating PID file
- Google 广告投放(iOS)
- Java 基础
- C++ 界面设计须知
- 浅谈Draw Call和Batch的区别
- Unix下Apache HTTP编译及安装
- MySQL启动报【The server quit without updating PID file】错误的解决过程
- socket设置超时的几种方法
- 探究APP应用启动过程
- 海思移植opencv+车辆检测
- AccessibilityService
- PHP 延迟静态绑定 功能 static
- 值得推荐的C/C++框架和库 (真的很强大)
- 删除android系统自带锁屏,导航栏、状态栏、搜索框
- CodeForces 251A-Points on Line