1

I had mysql version 8 earlier, due to some dependency i had to downgrade to 5.7 so installed [email protected] via brew.

Steps

brew uninstall mysql brew install [email protected] mysql.server start brew link [email protected] --force 

Now once i have stopped the server and now i want to restart it but i am getting

ERROR! The server quit without updating PID file (/usr/local/var/mysql/dev_box.local.pid). 

When i do

mysqld --initialize 

I am getting

[ERROR] --initialize specified but the data directory has files in it. Aborting. [ERROR] Aborting 

But when i try to start the server using services it's starting but i am not getting anything in the grep but when i do "brew services list" it's showing that server is started. but i am not able to login

mysqladmin -u root password 'password' 

This gives the error

mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists! 

I have tried almost everything from

MySql server startup error 'The server quit without updating PID file '

After MySQL install via Brew, I get the error - The server quit without updating PID file

With no luck, hoping for some quick help.

3
  • Was there a mysql error log? That's the place I'd go to -- but since one of the answers to the questions you linked to suggested that, I'm assuming you tried. Commented Dec 4, 2019 at 18:52
  • @GeoffreyWiseman if you are talking about dev_box.err logs then yes, and tried with deleting that as well. Commented Dec 5, 2019 at 7:50
  • Did you find a solution to this? As im having similar problems now and exhausting all potential solutions Commented May 14, 2020 at 11:03

1 Answer 1

1

I had the same situation. What helped me is:

First uninstall mysql using brew

brew uninstall mysql brew uninstall [email protected] 

Then manually go through all folders in /usr/local/ and delete everything related to mysql.

For example, I had /usr/local/etc/my.cnf and my.cnf.default, so had to run rm -f /usr/local/etc/my*; also /usr/local/mysql-5.7.21-macos10.13-x86_64 and mysql-8.0.16-macos10.14-x86_64, so rm -rf /usr/local/mysql* and so on.

After this is done install using brew

brew install [email protected] brew services start [email protected] 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.