Search code examples
mysqlmacosinstallationosx-maverickshomebrew

OSX 10.9.5 brew install mysql - "The post-install step did not complete successfully"


As mentioned in the question header, I am unable to install mysql using Homebrew.

shubhamgoyal$ brew install mysql

`==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/mysql-5.6.21.mavericks.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/mysql-5.6.21.mavericks.bottle.tar.gz
==> Pouring mysql-5.6.21.mavericks.bottle.tar.gz
==> Caveats
A "/etc/my.cnf" from another install may interfere with a Homebrew-built server starting up correctly.

To connect:
    mysql -uroot

To have launchd start mysql at login:
    ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Or, if you don't want/need launchctl, you can just run:
    mysql.server start
==> /usr/local/Cellar/mysql/5.6.21/bin/mysql_install_db --verbose --user=shubhamgoyal --basedir=/usr/local/Cellar/mysql/5.6.21 --datadir=/usr/local/var/mysql --tmpdir=/tmp
2014-10-02 14:29:01 18521 [Note] InnoDB: FTS optimize thread exiting.
2014-10-02 14:29:01 18521 [Note] InnoDB: Starting shutdown...
2014-10-02 14:29:03 18521 [Note] InnoDB: Shutdown completed; log sequence number 123515594
2014-10-02 14:29:03 18521 [Note] /usr/local/Cellar/mysql/5.6.21/bin/mysqld: Shutdown complete

Warning: The post-install step did not complete successfully
You can try again using `brew postinstall mysql`
==> Summary
🍺  /usr/local/Cellar/mysql/5.6.21: 9621 files, 339M

shubhamgoyal$ mysql.server start

Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/27-43.priv23.nus.edu.sg.pid).`

I cannot find any /etc/my.cnf file and so I do not know why this problem is happening.


Solution

  • sudo chown -R $(whoami) /usr/local