MySQL 错误!服务器退出而不更新 El captian 上的 PID 文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33808938/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 21:25:32  来源:igfitidea点击:

ERROR! The server quit without updating PID file on El captian

mysqlmacosterminalpidosx-elcapitan

提问by Yunhee

I have problem mysql starting, i was update to El captian on mac.

我在启动 mysql 时遇到问题,我正在 mac 上更新到 El captian。

In terminal,

在终端,

brew install mysql

mysql.server start

酿造安装mysql

mysql.server 启动

but it not working this is error message.

但它不起作用这是错误消息。

 Starting MySQL... ERROR! The server quit without updating PID file(/usr/local/var/mysql/Heo-MacBook-Pro.local.pid).

help me please!

请帮帮我!

回答by HashSu

Try this first:

先试试这个:

/usr/local/var/mysql/support-files/mysql.server restart

If that doesn't fix Remove or backup the /etc/my.cnf

如果这不能解决删除或备份 /etc/my.cnf



also try this method:

也试试这个方法:

sudo /usr/local/var/mysql/support-files/mysql.server start
Starting MySQL
. ERROR! ....................

remove the .err files like so:

删除 .err 文件,如下所示:

rm *.err /usr/local/var/mysql/data/

回答by Braian

I had the same problem using brew command to start mysql service. If you are using MacOS, go to System Preferences and click on MySQL icon. Probably you'll see information message about permission denied in some directories. All you need to do is to give permission to that.

我使用 brew 命令启动 mysql 服务时遇到了同样的问题。如果您使用的是 MacOS,请转到系统偏好设置并单击 MySQL 图标。您可能会在某些目录中看到有关权限被拒绝的信息消息。您需要做的就是对此给予许可。

That's worked for me.

这对我有用。

  1. Open your terminal
  2. Execute this command: sudo chown -R mysql /usr/local/mysql/data
  1. 打开你的终端
  2. 执行这个命令: sudo chown -R mysql /usr/local/mysql/data

回答by Shi Jieming

Solution working for my case:

适用于我的案例的解决方案:

  1. Check your error log at /usr/local/var/mysql/Heo-MacBook-Pro.local.err

  2. If there is something like this in the log: ...[Note] Unable to delete pid file: Permission denied..., which means mysql does not have the permission to your mysql folder

  3. Use the following command in terminal to grant the permission: sudo chown -R mysql /usr/local/var/mysql/

  1. 在 /usr/local/var/mysql/Heo-MacBook-Pro.local.err 检查错误日志

  2. 如果日志中有这样的东西:...[注意] Unable to delete pid file: Permission denied...,这意味着mysql没有你的mysql文件夹的权限

  3. 在终端中使用以下命令授予权限:sudo chown -R mysql /usr/local/var/mysql/