MySQL.. ERROR! The server quit without updating PID file问题解决
不小心将服务器OS给重启了,再启动数据库的时候,出现了很奇怪的问题
[root@dev run]# service mysql restart
ERROR! MySQL server PID file could not be found!
Starting MySQL.. ERROR! The server quit without updating PID file (/var/lib/mysql/run/mysql.pid).
无法启动mysql,后来上网找了一下解决方法,无非就是以下几种
1. 注释/etc/my.cnf里的skip-federated注释掉即#skip-federated;
2. my.cnf文件配置过高,重新定义其中的参数(根据服务器情况定义);
3. 杀掉mysql_safe和mysqld进程,然后再重启;
4. 当前日志文件过大,超出了my.cnf中定义的大小(默认为64M),删除日志文件再重启;
但是在主机中:
1. 注释中无skip-federated这个选项
2. My.cnf是自己优化过的,断电之前正常使用,不是这个的问题
3. Ps –ef | grep mysql 根本就没有mysql的僵尸进程
4. 没有这个问题
基本上网上的所有方式都试过了,都无法解决问题,然后在数据库的data目录(mysql/data)查看错误日志,我的服务器是localhost.localdomain.err文件,也可能是
(/var/lib/mysql/log/error.log)
2014-06-10 11:52:46 15921 [Note] InnoDB: Database was not shutdown normally!
2014-06-10 11:52:46 15921 [Note] InnoDB: Starting crash recovery.
2014-06-10 11:52:46 15921 [Note] InnoDB: Reading tablespace information from the .ibd files...
2014-06-10 11:52:46 15921 [ERROR] InnoDB: Attempted to
open a previously opened tablespace. Previous tablespace
raildb/base_company_fullname uses space ID: 4 at filepath:
./raildb/base_company_fullname.ibd. Cannot open tablespace
mysql/slave_master_info which uses space ID: 4 at filepath:
./mysql/slave_master_info.ibd
2014-06-10 11:52:46 7ff29246d720 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
InnoDB: Error: could not open single-table tablespace file ./mysql/slave_master_info.ibd
InnoDB: We do not continue the crash recovery, because the table may become
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
InnoDB: To fix the problem and start mysqld:
InnoDB: 1) If there is a permission problem in the file and mysqld cannot
InnoDB: open the file, you should modify the permissions.
InnoDB: 2) If the table is not needed, or you can restore it from a backup,
InnoDB: then you can remove the .ibd file, and InnoDB will do a normal
InnoDB: crash recovery and ignore that table.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.
140610 11:52:46 mysqld_safe mysqld from pid file /var/lib/mysql/run/mysql.pid ended
第一处标黄,提示是数据库没有正常关闭
第二处标蓝,提示正在从.ibd files读取tablespace information
第三处标红,就是开始error的地方,大概意思就是读取不到raildb这个库的tablespace
下边说的就是一些处理这个问题的方法,就不一一翻译了
最后我感觉是因为断电之前,mysql没有正常关闭,造成了raildb这个库的一些异常,我采用的解决方法是在innoDB,强制覆盖
Vi /etc/my.cof 增加一行 innodb_force_recovery= 1
然后重启,接着报错:
mysqld: File './mysql-bin.index' not found (Errcode: 13)
查看data目录下mysql-bin.index是存在的,怀疑是权限问题,对整个mysql目录重新赋权:
chown -R mysql:mysql mysql
再次重启,问题解决...
MySQL.. ERROR! The server quit without updating PID file问题解决的更多相关文章
- Starting MySQL... ERROR! The server quit without updating PID file 问题解决
今天遇到一个mysql起不来,不知为啥挂了,启动是下面的报错 Starting MySQL... ERROR! The server quit without updating PID file 后来 ...
- [转]MySQL: Starting MySQL….. ERROR! The server quit without updating PID file
转自: http://icesquare.com/wordpress/mysql-starting-mysql-error-the-server-quit-without-updating-pid-f ...
- MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法
MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法 1 问题 [root@localhost m ...
- centos6.6下编译安装mysql5.6之后启动失败:Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).
今天在编译安装mysql5.6时候出现Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysq ...
- Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/var/AYXXXXXXXXXXX.pid). 错误解决方法
/etc/init.d/mysql start无法启动MySQL错误信息如下: ERROR! MySQL server PID file could not be found! Starting My ...
- mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid)
mysql启动报错Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.p ...
- Starting MySQL. ERROR! The server quit without updating PID file如何解决
今天数据库突然挂了.重启提示: Starting MySQL. ERROR! The server quit without updating PID file (/usr/local/mysql/v ...
- Starting MySQL.. ERROR! The server quit without updating PID file
版权声明:本文为博主原创文章,未经博主允许不得转载. 注意:本文出自 “阿飞”的博客 ,如果要转载本文章,请与作者联系! 并注明来源: http://blog.csdn.net/faye0412/ar ...
- Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/data/vm10-0-0-19
输入:service mysqld start 报错: Starting MySQL.. ERROR! The server quit without updating PID file (/usr/ ...
随机推荐
- 枪击手机屏幕应用android源码
这款是作者最新的一款应用源码,枪击手机屏幕应用源码,该应用源码比较完整的,应用目前已经上线了一些应用商店了,大家想更深入的了解,可以到一些应用商店下载吧,直接搜索相关的关键字就可以搜到了,或者在下面有 ...
- C++ 中的 const 详解
作者:jostree 转载请注明出处 http://www.cnblogs.com/jostree/p/4235721.html 1.为什么使用 const int 而不使用 #define 在使用# ...
- apk反编译之二——smali学习
在apk被反编译后,原来的java程序会以smali文件呈现.这就需要补充smali的知识.依旧参考官方文档,择日我将把官方文档做一下翻译.今日先贴出链接地址: 1:了解smali字节码的寄存器 请参 ...
- oracle11g关于表空间的问题
1.oracle11g默认的块大小为8K 每个表空间里面的单个数据文件最大为32G (2^22-1) *4k 最多可以放1024个单个文件 SQL> show parameter ...
- java项目中读取src目录下的文件
private void getUser(String tmpfile){ Properties props = new Properties(); props.load(DbTask.class.g ...
- innobackupex:Error:xtrabackup child process has died at /usr/bin/innobackupex
使用innobackupex进行数据库备份,报如下错误:innobackupex --compress --parallel=4 --user=root --password=yoon /expo ...
- Liferay SDK 6.2与7.0中build.[$username].properties 文件的配置
这篇文章是针对刚开始开发Liferay的新手写的,希望能够帮到刚入门的开发者减少一些配置上的麻烦. 前提: 1. 下载了Liferay IDE(Liferay的官方开发工具) 2.下载了Liferay ...
- bnuoj 25659 A Famous City (单调栈)
http://www.bnuoj.com/bnuoj/problem_show.php?pid=25659 #include <iostream> #include <stdio.h ...
- C#中Linq查询基本操作
摘要:本文介绍Linq查询基本操作(查询关键字) - from 子句 - where 子句 - select子句 - group 子句 - into 子句 - orderby 子句 - join 子句 ...
- Windows Phone 8.1 与 Windows Phone 8.1 Silverlight区别
以下讨论基于当前的WP8 APP, 一.Windows Phone 8 app:旧的WP8程序:不需要迁移: 二.Windows Phone 8.1 app新的使用Windows Runtime 的程 ...