MySQL: error on El Capitan OS after Yosemite OS update

雨燕双飞 提交于 2019-12-06 06:11:04

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

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

I will look something like this:

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

Copy the path of the mysqld.local.pid file

Next open your my.cnf file using nano

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

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

Close and save the file

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

I had to create the file my.cnf in /etc and add [mysqld] before the line pid-file = /path/to/your/local/mysqld.local.pid Finally it worked!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!