1

environment

OS X El Capitan 10.11 , Mysql 5.6.26

What I did

mysql port was 3307 when I installed it. ( I didn't install it using brew.)
I changed the port 3306 to 3306 by editing /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist after using mysql with 3307 port for 6 months well. I revised <string>--port=3307</string> to 3306.

I tried to stop and It didn't work. So I used following: sudo kill -9 [PID]

It's killed and didn't start. So I changed the port 3006 to 3007.

I tried to start mysql server with following command and got a error. sudo /usr/local/mysql/support-files/mysql.server start ERROR! The server quit without updating PID file (/var/lib/mysql/nhnui-MacBook-Pro.local.pid). And I found some helpful advices in follwing link. reference link : After MySQL install via Brew, I get the error - The server quit without updating PID file

I tried to change ownership of files, checking my.cnf file, checking error log file and all didn't work for me. Finally, I removed /usr/local/mysql/datamysqld.local.err , /usr/local/mysql/datamysqld.local.pid and rebooted mac.and I can start mysql server.

The Problem

Then, the problem is above tip is not perfect for me. mysql server was running after restarting mac. I checked it with 'ps-ef | grep mysql'.

Stop and start was success and then it didn't stop it again cause of same error!

Screenshot of the error :

Screenshot 1

Of course, I did it again (I mean deleting .err , .pid file / rebooting mac / cheking mysql ps / stop - start (well) / stop (got error)) and checked that it has same error.

Here is the error log : /usr/local/mysql/data/mysqld.local.err

Screenshot 2

Now, mysql server can't stop.

What can I do to solve this?

P.S - If it will be better to reinstall mysql, I should do that.

Community
  • 1
  • 1

1 Answers1

0

Make a backup of your system.

Dump your data into text files.

Uninstall everything releated to mySql (a quick Google search will point you to several how-tos)

Reinstall mySql from the package in the .dmg available from mySql website.

You can choose the latest 5.6.x or 5.7.x

Set the mySql root password and you're done.

When things get messy and all you can do is guessing what's the fix it's faster to reinstall given that a package installer is provided for mySql (you don't have to compile it yourself or play with brew/macports).

Paolo
  • 15,233
  • 27
  • 70
  • 91