Brew makes quick work of updating the local mysql database on a Mac running Yosemite 10.10. However, while stepping through an upgrade on the latest version I ran into a PID or (process ID) error. After a bit of detective work I realized the PID wasn’t being saved back to the system due to a user permission error on the log file.
-rw-r----- 1 _mysql admin 33150 Nov 19 13:58 USERNAME.local.err
I wanted to fix this before fresh installs of other development tools like Gulp and Bower, etc. Here’s the original startup error.
MySql server startup error 'The server quit without updating PID file '
After fixing mysql and removing the old versions of nodejs and npm, I ran brew doctor to remove the symlinks to the old directories and finally, removed the directory itself.
Warning: Broken symlinks were found. Remove them with `brew prune`: /usr/local/bin/bower /usr/local/bin/grunt /usr/local/bin/npm /usr/local/bin/roots
Then we removed the original node directory.
Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink bin/node Target /usr/local/bin/node already exists. You may want to remove it: rm '/usr/local/bin/node'
So we removed the old and reinstalled NPM and Node.js modules.
Warning: You have unlinked kegs in your Cellar Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: node
And brew makes creating new symlinks simple:
brew link node
The following checks packages once they are installed.
npm ls -g