本文介绍了MySQL错误!服务器退出而不更新PID文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我继承了一台以前安装了MySql服务器,然后再将其卸载的计算机(显然,在卸载之前,它运行良好).我在数据库类中,因此尝试再次安装它,现在出现错误:

I inherited a computer that previously had MySql server installed and then uninstalled (apparently, it ran fine before the uninstall). I am in Database class, so I tried to install it again and now I get the error:

启动MySQL.错误!服务器退出而不更新PID文件(/usr/local/mysql/data/Computer.local.pid).

Starting MySQL. ERROR! The server quit without updating PID file (/usr/local/mysql/data/Computer.local.pid).

我在网上看了看,发现这个错误发生在其他人身上,但是a)我不知道该怎么做,或者b)该修复对我不起作用.

I looked online and saw this error happened to others, but either a)I couldn't figure out how to do the fix or b)the fix didnt work for me.

我尝试(来自 http://coolestguidesontheplanet.com/mysql-error-server-quit-without-updating-pid-file/):

计算机:/computer $/usr/local/mysql/support-files/mysql.server restart

Computer:/ computer$ /usr/local/mysql/support-files/mysql.server restart

我得到这个错误:错误!找不到MySQL服务器PID文件!启动MySQL

And I get this error:ERROR! MySQL server PID file could not be found!Starting MySQL

.错误!服务器退出而不更新PID文件(/usr/local/mysql/data/Computer.local.pid).

我不确定他们在告诉我在这里做什么:

删除/etc/my.cnf或暂时将其备份并重新启动:须藤MV/etc/my.cnf/etc/my.cnf.bak

Remove /etc/my.cnf or just back it up for now and restart:sudo mv /etc/my.cnf /etc/my.cnf.bak

因为键入时出现此错误:

because I get this error when I type:

计算机:/computer $ cd/usr/my.cnf

-bash:cd:/usr/my.cnf:没有这样的文件或目录

我还从以下地方看到: mysql错误!服务器不更新PID文件就退出了吗?那里有错误日志和my.cnf文件,但是我不确定要访问它们.

I also see from: mysql ERROR! The server quit without updating PID file?That there are error logs and the my.cnf file, but I am not sure to access them.

我下载的MySql:mysql-5.7.10-osx10.9-x86_64.dmg

The MySql I downloaded: mysql-5.7.10-osx10.9-x86_64.dmg

我使用的是Mac版本10.7.5

I am on a mac version 10.7.5

谢谢!

推荐答案

主要是权限问题

第1步::首先检查错误文件.

Step1: Check the error file first.

tail -f /usr/local/mysql/data/*.err

第2步::彻底关闭或终止该过程.确认没有mysql进程正在运行

Step2: Do a complete shut down or kill the process. Confirm that no mysql process is running

mysqladmin -uroot shutdown
sudo killall mysqld

ps -ef | grep mysql

第3步:提供权限

sudo chown -RL root:mysql /usr/local/mysql
sudo chown -RL mysql:mysql /usr/local/mysql/data
chmod -R 755 /usr/local/mysql/data

第4步:启动mysql

sudo mysql.server start

这篇关于MySQL错误!服务器退出而不更新PID文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 17:49