As you may expect from open source world thingy, almost every Linux distribution has developed it’s own way to manage our favourite RDBMS service. Yet none is perfect, or even some of them seems to not work in real server scenario1.
In this post I’m trying to compare and point out most annoying aspects of initialization scripts that I had to face in production.
In ‘old days’ probably all Linux distributions used to start and stop services using so called init scripts usually written in Unix shell (sh or Bash). But situation is not so simple these days anymore.
Folks started to think about improving things, like making system initialization faster by parallelization of starting services. So Upstart was developed in Ubuntu world, then systemd appeared and became popular in other distros. There are also runit, launchd and more.
However in first part of this article I’d like to focus on traditional init.d scripts which were built many years ago, and really didn’t change a lot over time.
People tend to divide Linux world into ‘rpm-ish’ and ‘debian-ish’ distros, so lets take a look at examples from the most popular of both continents – Debian/Ubuntu and Redhat/CentOS. As you probably know historically MySQL maintainers rather poorly supported Debian/Ubuntu world (if at all), maybe that’s why Debian people decided to completely rework the init script provided by MySQL team. And IMHO that was not the best idea since the original script did the job pretty much as it should, maybe someone considered it as being too far from Debian rules though . Note that the original MySQL init.d script has been almost identical from 5.0 version up to 5.6 (just verified community server editions: 5.0.95, 5.1.61 and 5.6.4).
Lets compare just the ‘start’ section of both the original2 and the one provided with Debian/Ubuntu init.d scripts.
- in my understanding ‘real server scenario’ is when you need dedicated database server or many of them in order to keep up with the live application needs [↩]
- http://dev.mysql.com/doc/refman/5.6/en/mysql-server.html [↩]