0

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

2 Answers 2

3

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.

2
  • 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, 2014 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, 2014 at 8:57
0

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

You must log in to answer this question.

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