After MySQL install via Brew, I get the error - Th

2019-01-12 16:55发布

Ok, I've searched all over and have spent quite a bit of my time installing, uninstalling, trying various option but without success.

I'm on Mac OS X Lion (10.7.3) and am trying to setup a Python, MySQL.

I successfully installed Python and MySQL via HomeBrew. Python works great.

After MySQL Installation, I followed the first 2 steps - unset and the mysql_install_db commands.

Now, when I try to start mysql "mysql.server start", I get the following error

ERROR! The server quit without updating PID file (/usr/local/var/mysql/Brajeshwar.local.pid).
  • Brajeshwar is my username on my machine.

25条回答
Animai°情兽
2楼-- · 2019-01-12 17:18

I had this issue on mac 10.10.5 Yosemite

What I did to solve this

cd /usr/local/var/mysql
sudo rm *.err && sudo rm *.pid
sudo reboot
sudo mysql.server start

查看更多
Juvenile、少年°
3楼-- · 2019-01-12 17:18

Find usr/local/var/mysql/your_computer_name.local.err file and understand the more information about error

Location : /usr/local/var/mysql/your_computer_name.local.err

It's probably problem with permissions

  1. Find if mysql is running and kill it

ps -ef | grep mysql

kill -9 PID

where PID is second column value 2. check ownership of mysql

ls -laF /usr/local/var/mysql/

if it is owned by root, change it mysql or your user name



sudo chown -R mysql /usr/local/var/mysql/

查看更多
该账号已被封号
4楼-- · 2019-01-12 17:22

I had this problem on Linux, but the cause is relevant to any mysql installation. In my case, the server was crashing before startup was complete and the pid file updated. The error messages were seen when starting up mysqld directly instead of via "service mysql start".

In my case, the cause was the partition where the log files were located being full. Removing log files permitted mysql to start again. To test for this issue, go to the location of your mysql activity logs, and do df ..

查看更多
beautiful°
5楼-- · 2019-01-12 17:23

I had the same issue on OS X El Capitan, here's the terminal command sequence that fixed it for me.

Delete error files (you'll have to change the path depending on your setup)

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

Find the info for the mysql process that's still running and kill it:

ps -A | grep -m1 mysql | awk '{print $1}' | sudo xargs kill -9

Now restart MySQL:

/usr/local/mysql/support-files/mysql.server start
查看更多
我命由我不由天
6楼-- · 2019-01-12 17:24
$ sudo mysql.server restart

It works for me.

查看更多
小情绪 Triste *
7楼-- · 2019-01-12 17:26

My issue was that I started server as sudo once and then tried to restart as a local user.

Here mysql was not able to write to '.err' file owned by root. I had to remove that file and restart the server:

sudo rm /usr/local/var/mysql/*.err
mysql.server start
查看更多
登录 后发表回答