Starting MySQL..The server quit without updating PID file (varlibmysqllocalhost.localdomain.pid

Starting MySQL..The server quit without updating PID file (varlibmysqllocalhost.localdomain.pid,第1张

问题描述: [root@bogon mysql-5.1.41]# /etc/rc.d/init.d/mysqld startStarting MySQL.Manager of pid-file quit without updating file.[失败] --------------------------- 解决办法:配置的时候有一个步骤是 cp support-files/my-medium.cnf /etc/my.cnf 就编辑my.cnf,在[mysqld]下面加上:datadir = /usr/local/mysql/data 例如# The MySQL server[mysqld]port= 3306socket = /tmp/mysql.sockskip-lockingkey_buffer_size = 16Mmax_allowed_packet = 1Mtable_open_cache = 64sort_buffer_size = 512Knet_buffer_length = 8Kread_buffer_s ... 2.首先到/usr/local/mysql/data先 chown -R mysql:mysql * 然后杀掉mysql进程,在启动musql就行了打开/etc/selinux/config,把SELINUX=enforcing改为SELINUX=disabled后存盘退出重启机器试试3.4.确实一般都是my.cnf配置文件的问题/etc/my.cnf来自以下文件:如果你的内存≤64M,则复制/usr/local/share/mysql/my-small.cnf为/etc/my.cnf# This is for a system with little memory (<= 64M) where MySQL is only used# from time to time and it's important that the mysqld daemon# doesn't use much resources.如果内存是128M,则复制/usr/local/share/mysql/my-medium.cnf为/etc/my.cnf# This is for a system with little memory (32M - 64M) where MySQL plays# an important part, or systems up to 128M where MySQL is used together with# other programs (such as a web server)如果内存是512M,则复制/usr/local/share/mysql/my-large.cnf为/etc/my.cnf# This is for a large system with memory = 512M where the system runs mainly# MySQL.如果内存是1-2G,则复制/usr/local/share/mysql/my-huge.cnf为/etc/my.cnf# This is for a large system with memory of 1G-2G where the system runs mainly# MySQL.

“#”号是注释,你配置文件中行首都加“#”号,那不就是你所有的配置都没有启作用么?解决办法:首先把你需要的配置行前面的#都删除掉,然后重启一下mysql试试。如果不行看下面。导致这种错误的几种原因: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.可能是第二次在机器上安装mysql,有残余数据影响了服务的启动。解决方法:去mysql的数据目录/data看看,如果存在mysql-bin.index,就赶快把它删除掉吧4、检查在你安装mysql之前,系统是不是已经有安装过的mysql,如果系统已经存在不是你需要的mysql版本,需要先删除原版本,然后在安装。5、查看selinux是否关闭状态。

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

“#”号是注释,你配置文件中行首都加“#”号,那不就是你所有的配置都没有启作用么?

解决办法:

首先把你需要的配置行前面的#都删除掉,然后重启一下mysql试试。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5909356.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-08
下一篇 2023-03-08

发表评论

登录后才能评论

评论列表(0条)

保存