Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am unable to start MySQL server after upgrading from OSX 10.8.5 to 10.9.3

prompt: sudo ./support-files/mysql.server restart

 ERROR! MySQL server PID file could not be found!
./support-files/mysql.server: line 276: cd: /usr/local/mysql: No such file or directory
Starting MySQL
 ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)

The start button on the MySQL preference pane is also greyed out. One thing I noticed is that the instructions here do not work as my mysql folder is actually called 'mysql-5.6.11-osx10.7-x86_64' and not plain 'mysql'

The /data directory is still there so a reinstall would be an acceptable resolution as long as I can preserve the data

share|improve this question

migrated from serverfault.com Jun 30 '14 at 5:37

This question came from our site for system and network administrators.

up vote 3 down vote accepted

I have never used OSX, but I know that it supports symbolic links. Try creating a symbolic link in the directory containing mysql-5.6.11-osx10.7-x86_64.

sudo ln -s mysql-5.6.11-osx10.7-x86_64 mysql

Then try starting mysql with the mysql.server script.

Alternatively, edit the paths in the mysql.server script to match the folder names on your system.

share|improve this answer
    
Thanks! For anyone else, a similar solution suggested here : codedmemes.com/lib/mavericks-server-pitfalls-fixes but not that the article mainly addresses OSX server issues – codecowboy Jun 29 '14 at 11:00
    
This solved my problem as well. The only thing is that the symbolic link creation can cause permission issues that can be solved with a permission repair (in my case I used chown to restore the owner:group to root:wheel). Failing to do so prevented the preference pane to start mysql. – elbuild Sep 16 '14 at 8:57

depending on your data, mysql location etc

1)
cd /usr/local
sudo ln -s /usr/local/YOUR_MYSQL mysql

eg
sudo ln -s mysql-5.6.21-osx10.8-x86_64 mysql

2) Take a backup copy first and change the following values

sudo vi /usr/local/mysql/support-files/mysql.server
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
mysqld_pid_file_path=$datadir/hostname.pid

3)
start via system preferences->MySQL panel

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .