Keeping up with my local dev environment, a while back I wrote a post on Starting and stopping NginX-MySQL-PHP-FCGI on Mac OS X. I’ve made some changes since then, and I now use a slightly different stack.
I modified MacPorts to configure PHP5 with FPM support, and added in Memcached (also Varnish, but we don’t use that at work and I haven’t been inclined to mess with it, so it’s not in my script).
Script source and changelog after the break…
As these things go, it’s super easy to get a LEMP stack up and running on Mac OS X 10.6 (Snow Leopard). Although at that point I guess it’s a MNMP stack, but that’s an even more ridiculous mnemonic.
Starting up and shutting down each individual service, however, is a pain in the butt. Sure, 3 services doesn’t sound like a lot now but wait until your 12th configuration tweak in the course of a few hours. Sure, every tutorial out there has a copy-and-paste-service-script-that-only-needs-a-few-tweaks-to-get-up-and-running-on-your-system. Forget that; I just want to sudo port install nginx mysql-server php-fcgi and rock’n’roll, bitch.
I don’t want these things running all the time, so forget setting them as startup items. And I don’t really have the patience to make or tweak service scripts.
So here’s what I do
So I was working at home over the weekend using MySQL on my MacBook running OS X 10.6 (Snow Leopard), put my computer to sleep then came in to the office this morning and opened it back up.
At one point I had to restart MySQL (which up to this point was running fine), and received this error:
$ sudo /opt/local/share/mysql5/mysql/mysql.server start
ERROR! Manager of pid-file quit without updating file.
Continue reading MySQL error: Manager of pid-file quit without updating file.