Problem installing MySQL (5.7.15) in macOS Sierra (10.12)


I just upgraded my MacBook-Air (2013) to macOS Sierra and when I try to install MySQL (mysql-5.7.15-osx10.11-x86_64.dmg) it installs correctly but when I try to do one:

sudo /usr/local/mysql/support-files/mysql.server start


sudo /usr/local/mysql/support-files/mysql.server stop

appears to me:

ERROR! MySQL server PID file could not be found!

asked by Faca Poveda 09.10.2016 в 18:44

2 answers


To solve the problem we will do the following: 1) We identify the PID file, in my case it is on the route:


NOTE1: If you can not access data due to permission problems:

sudo chmod 775 /usr/local/mysql/data

NOTE2: To know which is the PID route you can try to make a "server start":

sudo /usr/local/mysql/support-files/mysql.server start

and there when they check the ERROR, it will appear. In my case it is:


2) We identify the configuration file, in my case it is on the route:


3) We give you permission with:

sudo chmod 775 auto.cnf

4) We open it with VIM:

vim auto.cnf

5) We add the following line to the end of the file:

pid-file = /usr/local/var/mysql/{nombreDeUsuario}.pid

6) Restart your mac.

NOTE: Remember to replace the places where {username_name} .pid says with the username of your mac; in my case, faca-air (

NOTE2: If it does not work for you, do the same procedure but with the following path of the PID file:

answered by 09.10.2016 / 18:44

Do not install the 5.7 because .... it was impossible to make it work, I tried with the 5.6 and same problem but following this explanation and using the route of the note 2 worked, although not first if the second attempt. Remember this order:

1st Turn off the server in the system preferences panel. 2º Start it from terminal with sudo /usr/local/mysql/support-files/mysql.server start 3º Shut it down with sudo /usr/local/mysql/support-files/mysql.server stop

By this order if I worked.

A million thanks, I continue ... with SQL to see that I am now. I'm already "catching" fear;)

answered by 04.01.2018 в 10:23