解决mysql启动时报The server quit without updating PID file 的错误(转)

1.一般是权限问题,把用户和组改为mysql就可以了。

chown -R mysql:mysql  /var/lib/mysql

2.在启动mysql时报下列错误

[[email protected] ~]# service mysql.server start
Starting MySQL......................................The server quit without updating PID file (/var/lib/mysql/mysqld2.clvn.com.cn.pid).                       [失败]

解决方法

查看日志文件

[[email protected] mysql]# tail /var/log/mysqld.log 
2014-05-09 22:08:10 3483 [Note] NDB: Changed global value of binlog_format from STATEMENT to MIXED
2014-05-09 22:08:46 3483 [Warning] NDB: server id set to zero - changes logged to bin log with server id zero will be logged with another server id by slave mysqlds
2014-05-09 22:08:46 3483 [Note] Starting Cluster Binlog Thread
2014-05-09 22:08:46 3483 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 6f59371c-d783-11e3-ac36-000c2971b28f.
2014-05-09 22:08:46 3483 [Note] Server hostname (bind-address): ‘*‘; port: 3306
2014-05-09 22:08:46 3483 [Note] IPv6 is available.
2014-05-09 22:08:46 3483 [Note]   - ‘::‘ resolves to ‘::‘;
2014-05-09 22:08:46 3483 [Note] Server socket created on IP: ‘::‘.
2014-05-09 22:08:46 3483 [ERROR] Fatal error: Can‘t open and lock privilege tables: Table ‘mysql.user‘ doesn‘t exist
140509 22:08:46 mysqld_safe mysqld from pid file /var/lib/mysql/mysqld1.clvn.com.cn.pid ended

解决方法

[[email protected] mysql]# scripts/mysql_install_db --user=mysql
Installing MySQL system tables...2014-05-09 22:51:12 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-05-09 22:51:12 3564 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-05-09 22:51:12 3564 [Note] InnoDB: The InnoDB memory heap is disabled
2014-05-09 22:51:12 3564 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-05-09 22:51:12 3564 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-05-09 22:51:12 3564 [Note] InnoDB: Using Linux native AIO
2014-05-09 22:51:12 3564 [Note] InnoDB: Using CPU crc32 instructions
2014-05-09 22:51:12 3564 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-05-09 22:51:12 3564 [Note] InnoDB: Completed initialization of buffer pool
2014-05-09 22:51:12 3564 [Note] InnoDB: Highest supported file format is Barracuda.
2014-05-09 22:51:12 3564 [Note] InnoDB: 128 rollback segment(s) are active.
2014-05-09 22:51:12 3564 [Note] InnoDB: Waiting for purge to start
2014-05-09 22:51:13 3564 [Note] InnoDB: 5.6.17 started; log sequence number 1626007
2014-05-09 22:51:13 3564 [Note] Binlog end
2014-05-09 22:51:13 3564 [Note] InnoDB: FTS optimize thread exiting.
2014-05-09 22:51:13 3564 [Note] InnoDB: Starting shutdown...
2014-05-09 22:51:14 3564 [Note] InnoDB: Shutdown completed; log sequence number 1626017
OK

Filling help tables...2014-05-09 22:51:14 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-05-09 22:51:14 3588 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-05-09 22:51:14 3588 [Note] InnoDB: The InnoDB memory heap is disabled
2014-05-09 22:51:14 3588 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-05-09 22:51:14 3588 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-05-09 22:51:14 3588 [Note] InnoDB: Using Linux native AIO
2014-05-09 22:51:14 3588 [Note] InnoDB: Using CPU crc32 instructions
2014-05-09 22:51:14 3588 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-05-09 22:51:14 3588 [Note] InnoDB: Completed initialization of buffer pool
2014-05-09 22:51:14 3588 [Note] InnoDB: Highest supported file format is Barracuda.
2014-05-09 22:51:14 3588 [Note] InnoDB: 128 rollback segment(s) are active.
2014-05-09 22:51:15 3588 [Note] InnoDB: Waiting for purge to start
2014-05-09 22:51:15 3588 [Note] InnoDB: 5.6.17 started; log sequence number 1626017
2014-05-09 22:51:15 3588 [Note] Binlog end
2014-05-09 22:51:15 3588 [Note] InnoDB: FTS optimize thread exiting.
2014-05-09 22:51:15 3588 [Note] InnoDB: Starting shutdown...
2014-05-09 22:51:16 3588 [Note] InnoDB: Shutdown completed; log sequence number 1626027
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

./bin/mysqladmin -u root password ‘new-password‘
  ./bin/mysqladmin -u root -h mysqld1.clvn.com.cn password ‘new-password‘

Alternatively you can run:

./bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

WARNING: Found existing config file ./my.cnf on the system.
Because this file might be in use, it was not replaced,
but was used in bootstrap (unless you used --defaults-file)
and when you later start the server.
The new default config file was created as ./my-new.cnf,
please compare it with your file and take the changes you need.

[[email protected] mysql]# ./bin/mysqld_safe &
[1] 3612
[[email protected] mysql]# 140509 22:51:29 mysqld_safe Logging to ‘/usr/local/mysql/data/mysqld1.clvn.com.cn.err‘.
140509 22:51:29 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

查看mysql.server的状态信息

[[email protected] ~]# service mysql.server start
Starting MySQL.                                            [确定]

参考:http://ovcer.blog.51cto.com/1145188/1409059

时间: 2024-08-03 15:24:30

解决mysql启动时报The server quit without updating PID file 的错误(转)的相关文章

MySql启动提示:The server quit without updating PID file(…)失败

在网上找了很多 1.可能是/usr/local/mysql/data/rekfan.pid文件没有写的权限解决方法 :给予权限,执行 “chown -R mysql:mysql /var/data” “chmod -R 755 /usr/local/mysql/data”  然后重新启动mysqld! 2.可能进程里已经存在mysql进程解决方法:用命令“ps -ef|grep mysqld”查看是否有mysqld进程,如果有使用“kill -9  进程号”杀死,然后重新启动mysqld! 3.

lnmp下启动mysql报错 The server quit without updating PID file

启动时候错误代码:Starting MySQL[FAIL.] The server quit without updating PID file (/var/run/mysqld/mysqld.pid). ... failed! lnmp作者军哥给的解答是:     这里面没有任何错误信息,按[FAIL.] The server quit without updating PID file (/var/run/mysqld/mysqld.pid     这个看可能又另外安装了mysql或存在其他

MySQL数据库出现The server quit without updating PID file.

LNMP1.0可以在Linux系统下快速搭建PHP环境,以前操作其它服务器也用过LNMP环境,重未出现过类似错误,现将解决过程记录一下. 一.服务器环境 操作系统:CentOS-6.4 服务器环境:集成环境LNMP1.0 二.步骤重现 1.安装LNMP1.0,具体操作方法见这里,安装成功: 2.因个人需求,现将MySQL数据库存放在/data/mysql/var,修改/etc/my.cnf的datadir=/data/mysql/var,别忘了将/var目录的权限设置为chown -R mysq

解决报错:The server quit without updating PID file

今天晚上要做一个开启MySQL bin-log日志的变更. 在关闭数据库后,修改参数文件,在mysqld下加上(一定要在mysqld下加上),即可开启mysql的binlog日志 [mysqld] log-bin=mysql-bin 修改完参数后启动数据库,数据库无法启动,报一下错误: 参看错误日志发下一下信息: 参看服务器内存 发现已经小于4G 修改参数文件,把4G改为2G innodb_buffer_pool_size = 2G 重新启动数据库,启动成功. 通过此处解决报错的过程,在出现报错

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.pid) 查看mysql错误日志也没有写入. 最后发现是selinux打开,汗…… 参考 mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid)

mysql编译安装完成后,启动时报错The server quit without updating PID file

源码包下载: 编译安装: 设置配置文件: 添加启动脚本: 添加开机启动项: 完成后,/etc/init.d/mysqld start 时候报错如下: Starting MySQL..The server quit without updating PID file ( [FAILED] al/mysql/data/FrankTest01.pid). 1.防火墙SELINUX有没有关闭 2.3306端口有没有被占用   netstat -tulanp 3.是否有其他相关的mysqld进程在运行.

mysql启动不成功显示The server quit without updating PID file的解决方法

上午在编译安装mysql的时候 就出现标题中的错误,经实践在第二步操作后启动成功,参考链接 链接http://linuxadministrator.pro/blog/?p=225 You may face this error while restarting MySQL. Below are some fix for the same. [[email protected]:- ] $ service mysqld startStarting MySQL… ERROR! The server

mysql启动报错:Starting MySQL... ERROR! The server quit without updating PID file

mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid) 的解决方法: 首先看一下我的mysql的配置文件的配置: cat /usr/local/mysql/my.cnf [mysqld] basedir = /usr/local/mysql datadir = /opt/mysql/data port = 3306 server_id = 1

MySQL提示:The server quit without updating PID file问题的解决办法

今天网站web页面提交内容到数据库,发现出错了,一直提交不了,数找了下原因,发现数据写不进去!第一反应,重启mysql数据库,一直执行中,停止不了也启动不了,直觉告诉我磁盘满了 ! 用df命令查了下,果然磁盘满了,因为当时分区采用系统默认,不知道为什么不能自动扩容!以后在处理这个问题!如图所示: 复制代码 代码如下: [[email protected] ~]# df文件系统                 1K-块      已用      可用 已用% 挂载点/dev/mapper/vg_s