MySQL:优胜美地OS更新后El Capitan OS上的错误 [英] MySQL: error on El Capitan OS after Yosemite OS update

查看:80
本文介绍了MySQL:优胜美地OS更新后El Capitan OS上的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MacBook上遇到MySQL问题.在安装MySQL服务器之前,我已将操作系统从优胜美地更新为El Capitan.

I have problems with MySQL on my MacBook. I had updated my OS from Yosemite to El Capitan before I installed MySQL server.

现在,当我尝试在Terminal上运行MySQL时,出现了这样的错误

Now, when I try to run MySQL on Terminal, I got the error like this

ERROR! The server quit without updating PID file

任何人都可以帮助我吗?非常感谢!

Anyone can help me please? Thanks a lot!

推荐答案

尝试更新my.cnf文件以手动设置PID文件的位置.这是您的操作方式.

Try updating your my.cnf file to set the location of the PID file manually. Here's how you do that.

在终端中运行以下命令.

In your Terminal run the following command.

ps -ax | grep mysql

这将列出重要的mysql文件的所有位置.寻找--pid-file

This will list all the locations of the important mysql files. Look for the path of the --pid-file

我将看起来像这样:

--pid-file=/path/to/your/local/mysqld.local.pid

复制mysqld.local.pid文件的路径

Copy the path of the mysqld.local.pid file

接下来使用nano打开您的my.cnf文件

Next open your my.cnf file using nano

sudo nano /usr/local/mysql/my.cnf

在my.cnf文件的末尾设置pid文件路径.搜索pid文件.如果找不到,请在my.cnf文件末尾手动输入.这将告诉mysql在哪里寻找PID文件.输入您复制的路径,如下例所示.

Set the pid-file path at the end of your my.cnf file. Search for pid-file. If you can't find it, manually enter it at the end of your my.cnf file. This will tell mysql where to look for the PID file. Enter the path that you copied like the example below.

pid-file = /path/to/your/local/mysqld.local.pid

关闭并保存文件

接下来重新启动mysql.您可能需要执行两次以重置PID错误.

Next restart mysql. You may need to do this twice to reset your PID error.

sudo /usr/local/mysql/support-files/mysql.server start

那应该可以解决您的问题!祝你好运

That should solve your problem! Good luck

这篇关于MySQL:优胜美地OS更新后El Capitan OS上的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆