The server quit without updating PID file

Posted liuxiutianxia

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了The server quit without updating PID file相关的知识,希望对你有一定的参考价值。

[[email protected] ~]# service mysqld start
Starting MySQL... ERROR! The server quit without updating PID file (/usr/local/mysql-5.5.62/data/fjgh.pid).

  

查看日志文件 /usr/local/mysql-5.5.62/data/fjgh.err

190520  9:06:34 [Note] Plugin FEDERATED is disabled.
190520  9:06:34 InnoDB: The InnoDB memory heap is disabled
190520  9:06:34 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190520  9:06:34 InnoDB: Compressed tables use zlib 1.2.11
190520  9:06:34 InnoDB: Using Linux native AIO
190520  9:06:34 InnoDB: Initializing buffer pool, size = 128.0M
190520  9:06:34 InnoDB: Completed initialization of buffer pool
190520  9:06:34 InnoDB: highest supported file format is Barracuda.
190520  9:06:34  InnoDB: Waiting for the background threads to start
190520  9:06:35 InnoDB: 5.5.62 started; log sequence number 1595675
190520  9:06:35 [Note] Server hostname (bind-address): 0.0.0.0; port: 3306
190520  9:06:35 [Note]   - 0.0.0.0 resolves to 0.0.0.0;
190520  9:06:35 [Note] Server socket created on IP: 0.0.0.0.
190520  9:06:35 [ERROR] Cant start server : Bind on unix socket: Permission denied
190520  9:06:35 [ERROR] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
190520  9:06:35 [ERROR] Aborting

注意  Can‘t start server : Bind on unix socket: Permission denied

发现  /var/lib/mysql 目录下并没有生成mysql.sock  预计是权限问题

于是修改 

[[email protected] ~]# chmod 777 /var/lib/mysql
[[email protected] ~]# service mysqld start
Starting MySQL.. SUCCESS! 

 启动成功

突然又发现 mysql -v 执行出差

[[email protected] bin]# mysql -v
-bash: msysql: command not found

查看环境变量配置

[[email protected] bin]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/java/jdk1.8.0_212/bin:/root/bin:/usr/local/mysql-5.5.60/bin

发现配置的mysql的bin目录不对,应该是  /usr/local/mysql-5.5.62/bin

修改,刷新配置即可

[ro[email protected] bin]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/java/jdk1.8.0_212/bin:/root/bin:/usr/local/mysql-5.5.60/bin
[[email protected] bin]# source ~/.bash_profile
[[email protected] bin]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/java/jdk1.8.0_212/bin:/root/bin:/usr/local/mysql-5.5.60/bin:/root/bin:/usr/local/mysql-5.5.62/bin

 

以上是关于The server quit without updating PID file的主要内容,如果未能解决你的问题,请参考以下文章

The server quit without updating PID file 报错

启动mysql报错:ERROR! The server quit without updating

MySQL启动报:[ERROR] The server quit without updating

Mysql启报错报The server quit without updating PID file

The server quit without updating PID file

Starting MySQL...The server quit without updating PID file