Mac下安装mysql后无法启动,错误提示The server quit without updating PID file

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wuzhong8809/article/details/83479626

现象:

1 sudo /usr/local/mysql/support-files/mysql.server start  提示 The server quit without updating PID file

 2 点击 系统偏好设置里的  mysql 没有看到正常的启动页面???

解决方法:

下载 mysql 的版本是不是和你机器的版本不一样!?

比如你的系统是 mac os 10.10,你下了一个要求10.14 的mysql 。是启动不了的。

在这里选版本:https://downloads.mysql.com/archives/community/ 

Mac book pro下卸载mysql

https://blog.csdn.net/qq_40144558/article/details/80791697

再重装吧。

提示:

安装的时候,记得看这个密码,很容易忽略:

如果没有记住,那就只能按这个方法重置密码

https://www.jianshu.com/p/807c5a361c4a

参看:下文教怎么看启动失败log。

https://stackoverflow.com/questions/4963171/mysql-server-startup-error-the-server-quit-without-updating-pid-file

With the help of a few answers posted here, I was able to find the issue

First I run

sudo -i

So I could have root access.

Than I deleted the xxxx.err file

rm -rf /usr/local/mysql/data/xxxx.err

after I started MySQL in SafeMode

/usr/local/mysql/bin/mysqld_safe start

It will try to start and will exit because of an error... a new xxx.err file will be created and you need to read it to see the cause of the error

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

On my case, for some reason, it was missing some folder and file inside /var/log/ folder... So I created both

cd /var/log

mkdir mysql

touch mysql-bin.index

After the new file was created, than you need to change permission

chown -R _mysql /var/log/mysql

When all those steps where taken, my database started working immediately...

Hope this can help others here... The key is to read the error and log and find whats is wrong...

猜你喜欢

转载自blog.csdn.net/wuzhong8809/article/details/83479626