Mark Rogers wrote:
However, you can never make two systems identical; they'll need to have different IP addresses (and trying to bind to the wrong IP could trigger an error), they'll have different traffic hitting them (and incoming connections might be what triggers an error), etc. That's not to say it's not without value, but in my experience it's as important to make sure a system recovers from an error as it is to try to avoid errors occurring.
MySQL has startup scripts which check that MySQL continues to run and restarts it otherwise, for example; there ought to be something similar for Apache (and I'm not saying there isn't, I just haven't found it if there is!) As far as I know MySQL doesn't have the ability to fall back to a known-good configuration but then MySQL's config doesn't change as often as Apache's does (I don't recall killing MySQL with a bad configuration anyway, but maybe that's selective memory).
It is possible to kill MySQL with config (I've done it), but generally only when first installing/setting-up - some of the same issues that pertain to Apache startup failure can apply (although it's much less likely to find its default port hijacked by anything else). I seem to remember though that it's a little more forthcoming about logging failures, especially if you run it directly to test (as in not using mysql_safe)
The big difference is that I would guess that 98% of people, once it's running, *never* mess with MySQL config ever again. In fact, most people who install MySQL through a package manager probably never mess with the config to start with, whereas with Apache you pretty much have to write some config to get it do anything useful.
You're right too though that you can never make a dev and live system totally identical - issues like inode/file-handle limits, thread counts/child process limits or memory issues are hard to test outside of real-world environments - at least a fall-back to last-known-good would help you keep your existing live setup running, but at least being able to test config breakages on a dev system is a Good Thing.