Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I can start mysql fine,

/usr/local/mysql/support-files/mysql.server start
Starting MySQL
SUCCESS! 

But any mysql action after that I get the error: MySQL server PID file could not be found

/usr/local/mysql/support-files/mysql.server stop
ERROR! MySQL server PID file could not be found!

Where do I find the server PID file on Mac with OSX 10.8? I am wondering if it is a permission problem. The mysql.sock file is a symlink pointing to the file in the tmp/ directory.

sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

Any help appreciated

share|improve this question

1 Answer 1

up vote 2 down vote accepted

In your mysql configuration file - my.cnf, check for the parameter pid-file and see where it points. If it is not there, set it manually to -

pid-file    = /var/run/mysqld/mysqld.pid

Create the directory /var/run/mysqld/ and give it proper permissions -

  mkdir /var/run/mysqld
  touch /var/run/mysqld/mysqld.pid
  chown -R mysql:mysql /var/run/mysqld
share|improve this answer
    
Okay, I am trying this. I will let you know how it goes –  simpleengine Feb 20 '13 at 23:29
    
Great, you are a genius. It works. The only thing that was missing was the line pid-file in my.cnf I had to run /usr/local/mysql/support-files/mysql.server restart twice to remove the error –  simpleengine Feb 20 '13 at 23:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.