`

mysql 启动报错-server PID file could not be found

 
阅读更多

[root@yunhe ~]# service mysql stop
MySQL server PID file could not be found!                  [失败]

解决方案如下:

首先查看下与mysql有关的进程

[root@yunhe ~]# ps aux |grep mysq*
root      2019  0.0  0.1   6228  1392 ?        S    09:22   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/yunhe.pid
mysql     2115  0.0  2.9 353596 30808 ?        Sl   09:22   0:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/yunhe.err --pid-file=/var/lib/mysql/yunhe.pid
500       4258  0.0  1.6  83432 17484 ?        S    09:35   0:01 gedit /usr/share/mysql/my-medium.cnf
root      5555  0.0  0.0   5936   768 pts/0    S+   10:04   0:00 grep mysq*

如果看到上面的内容,那说明mysql相关的进程存在,不过资源调度出现了问题(好像卡死),这时用就要把这些卡死的进程都关闭。
[root@yunhe ~]# kill 2019
[root@yunhe ~]# kill 20115
-bash: kill: (20115) - 没有那个进程
[root@yunhe ~]# kill 2115

然后重新启动mysql
[root@yunhe ~]# service mysql start
Starting MySQL...                                          [确定]
[root@yunhe ~]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.4-m7 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

分享到:
评论

相关推荐

    mysql启动报错MySQL server PID file could not be found

    在使用MySQL数据库的过程中,有时会遇到“MySQL server PID file could not be found”的错误,这是一个常见的启动问题,通常意味着MySQL服务器无法找到其进程ID(PID)文件,该文件用于记录数据库服务的运行状态。...

    MySQL 启动报错:File ./mysql-bin.index not found (Errcode: 13)

    Linux下安装初始化完MySQL数据库之后,使用... The server quit without updating PID file (/data/mysql/AY14020816093477605eZ.pid). 重启mysql会抛出上面红色字体的错误。 上面只能看到mysql启动失败,具体

    MySQL下PID文件丢失的相关错误的解决方法

    如果出现“PID file could not be found”的错误,可能需要通过`kill`命令找到并终止MySQL进程。 5. **检查配置文件**: 检查MySQL的配置文件`my.cnf`,确保`pid-file`选项指向正确的PID文件位置。例如: ``` ...

    Linux上安装MySQL

    在尝试启动MySQL时,可能会遇到如“Server PID file could not be found”之类的错误。这通常是由于旧的PID文件没有被正确清理导致的。解决方法如下: - 首先,检查是否有MySQL进程正在运行: ```bash ps aux | ...

    mysql安装问题

    在启动 MySQL 服务时,可能会出现 Server PID file could not be found 的错误。解决办法是首先查看一下进程,然后启动 MySQL 服务。 解决方法: 1. 查看进程:ps aux |grep mysq* 2. 启动 MySQL 服务:service ...

    MySQL下常见的启动失败与备份失败问题的解决教程

    接着尝试启动MySQL服务,但遇到了`PID file could not be found`的错误,这通常意味着MySQL找不到其进程ID(PID)文件,可能的原因是PID文件不存在或路径不正确。 为了解决这个问题,可以尝试手动创建PID文件,如`...

    卸载linux下安装的mysql

    如果遇到“MySQL server PID file could not be found”这样的错误提示,可以尝试通过查找进程ID来手动停止MySQL服务: ```bash echo `ps aux | grep mysql | grep "user=mysql" | grep -v "grep" | awk '{print $2...

    Hive常见错误及解决方案.docx

    在启动 MySQL 服务时,可能会出现 MySQL server PID file could not be found! 异常。解决方案是在 /var/lock/subsys/mysql 路径下创建 hadoop102.pid 文件,并在文件中添加内容:4396。 错误六:service mysql ...

    MySQL中文参考手册.docx

    8. **PID文件问题**:在安装或运行过程中可能会遇到“mysql pid file could not be found”的错误,这通常意味着MySQL服务没有正确启动或者配置文件中的PID路径不正确。解决方法可能包括检查服务状态、确认配置文件...

    MySQL无法启动的解决办法

    MySQL server PID file could not be found!”,这意味着MySQL找不到其进程ID(PID)文件。确保PID文件路径正确,并且MySQL有权限访问该文件。 4. **检查数据目录和文件权限**:MySQL需要对数据目录和所有相关文件...

    解决MySQL数据库意外崩溃导致表数据文件损坏无法启动的问题

    MySQL server PID file could not be found!"以及"Database was not shut down normally!"这样的错误信息时,这通常意味着数据库在上次关闭时并未正常完成事务,而是突然停止,可能导致InnoDB存储引擎的表空间信息...

Global site tag (gtag.js) - Google Analytics