To not yum or to not apt-get?

I’ve written shortly on this before. I like yum; I love apt-get; I prefer not to use them for MySQL installations. I consider a binary tarball to be the best MySQL installation format (source installations being a different case altogether).

Why?

I use yum and apt-get whenever I can and for almost all needs (sometimes preferring CPAN for Perl installations). But on a MySQL machine, I avoid doing so. The reason is either dependency hell or dependency mismatch.

Package managers are supposed to solve the dependency hell issue. But package managers will rarely have an up to date MySQL version.

I’ve had several experiences where a simple yum installation re-installed the MySQL version. I’ve had customers calling me up when, having installed something with yum, MySQL would not work anymore.

yum install package-which-depends-on-mysql-server will install MySQL server on your system if it hasn’t been installed with yum. Are you on CentOS 5.0? You’ll get MySQL 5.0.22. Oh, did you already have a RPM installation for MySQL 5.0.81? Sorry – it’s just been downgraded, plus it won’t work anymore since the error messages file has been changed since then.

Don’t press ‘Y‘ too soon!

Things are slightly better with apt-get. I’ve encountered less situations where mysql-server was on the dependency list. Many times it’s just the libmysqlclient package or the mysql-common one.

But wait! Did you install mysql-common? Bonus! You get the elusive /etc/mysql/my.cnf file created, and there goes your server configuration. Future spawns of the MySQL server / clients will read from the wrong configuration file, and will probably fail to load.

Not to mention neither will help you out with multiple instances installation.

My argument

A sys admin recently argued with me that it was wrong of me to have the entire machine set up with yum, but have MySQL installed with binary tarball. He argued that it broke the entire setup. I expressed my opinion: on a MySQL dedicated server, MySQL gets to be prioritized. It’s special. It is the reason for the existence of the machine. I would imagine that same would hold for Apache on an Apache dedicated machine, for Sendmail on a Sendmail dedicated machine, etc. As a DBA, I want to have best control of the MySQL installation; I want to be able to upgrade minor versions quickly: I often find newer versions to solve bugs I was concerned with; I want to be able to install multiple instances; I want to be able to downgrade without having to remove and uninstall the previous version.

I want to have control. World domination aside, that is.

26 thoughts on “To not yum or to not apt-get?

  1. @sime.

    It’s easier when you’re also the sys admin and are in full control. Even then there’s the issue of repositories not having an up-to-date MySQL version.

    It’s more difficult when others are allowed to “yum install”.

  2. @sime
    I empathize. I’m a team of one handling multiple OS’s, app development, apache, mysql, and even some oracle dependent services. App dev alone is consuming.

    I’m hopeful that cloud services will someday be the solution.

  3. I always use binary version (installed via yum) for my production. It is easier for me to recreate the same environment for devel/test before push it to production.
    If i want playing a bit or want to mess up something, i always do it in devel env. After i check all is fine then i push it to production.
    I’m prohibit myself for installing compiler (gcc) in production environment.
    All changes (patch, compiling option, etc) are managed in rpm spec file, so me and my coworker is easier to track what change, what already implement by other.
    Did I mention it is easier to apply those in massive environment (a lot of db server in production)

    In this way, I still get the freedom, less pain, easier to collaborate with my coworker.

  4. After a few security issues in the mysql-server packages in Ubuntu 6.06 LTS and almost nonexisted support from cannonical we switched to binary tarball installs. It works great. Switching to MySQL enterprise is also easier when you’re using tarballs.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.