6

I inherited a computer that previously had MySql server installed and then uninstalled (apparently, it ran fine before the uninstall). I am in Database class, so I tried to install it again and now I get the error:

Starting MySQL . ERROR! The server quit without updating PID file (/usr/local/mysql/data/Computer.local.pid).

I looked online and saw this error happened to others, but either a)I couldn't figure out how to do the fix or b)the fix didnt work for me.

I tried(from http://coolestguidesontheplanet.com/mysql-error-server-quit-without-updating-pid-file/):

Computer:/ computer$ /usr/local/mysql/support-files/mysql.server restart

And I get this error: ERROR! MySQL server PID file could not be found! Starting MySQL

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

I am not sure what they are telling me to do here:

Remove /etc/my.cnf or just back it up for now and restart: sudo mv /etc/my.cnf /etc/my.cnf.bak

because I get this error when I type:

Computer:/ computer$ cd /usr/my.cnf

-bash: cd: /usr/my.cnf: No such file or directory

I also see from: mysql ERROR! The server quit without updating PID file? That there are error logs and the my.cnf file, but I am not sure to access them.


The MySql I downloaded: mysql-5.7.10-osx10.9-x86_64.dmg

I am on a mac version 10.7.5

Thanks!

Community
  • 1
  • 1
JFQue3316
  • 121
  • 1
  • 1
  • 5

1 Answers1

31

Mostly this is a permission issue

Step1: Check the error file first.

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

Step2: Do a complete shut down or kill the process. Confirm that no mysql process is running

mysqladmin -uroot shutdown
sudo killall mysqld 

ps -ef | grep mysql

Step3: Give permisiions

sudo chown -RL root:mysql /usr/local/mysql
sudo chown -RL mysql:mysql /usr/local/mysql/data
chmod -R 755 /usr/local/mysql/data

Step4: Start mysql

sudo mysql.server start
mysqlrockstar
  • 2,536
  • 1
  • 19
  • 36