Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

Are there any benefits to installing mysql from source, or should I just use apt-get?

share|improve this question

marked as duplicate by Andrew Schulman, Community Jun 9 '15 at 21:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 7 down vote accepted

From source you'll get the binaries compiled to your architecture, from apt-get it will be compiled to i386 or ia64. There's a performance boost on that (at least in i386 packages).

And from source you can tweak the installation, removing uneeded features.

The drawback is the integration on the system, if you compile it and don't do anything more and later you install a package which depends on mysql your system will end with two mysql daemons installed, as apt doesn't know that there's a mysql installed already.

You can use apt-build. Apt-build downloads the sources of the debian package and compiles it, adding to the installed package lists. And you can also mantain updates as apt-get does.

share|improve this answer

use apt-get. It will make future updates much easier.

share|improve this answer

As theist stated, installing from source will give you the freedom to enable certain features.

On the list of typical comiple options are several storage engines listed. If you know, which one to use, don't compile the other ones. Candidates to disable are probably berkley-db and csv. But there might be use cases, when all you want is MySQL writing to CSV tables...

If you expect to have tables with more than 4G, you will probably need to compile your own, too.

Also, if you don't need to support SSL (e.g. if mysql is listenling on the local adress only), you don't have to install it.

To sum it up: It is not just about the compiler optimizations, but more about the features of your use case. If they do not include something that the prebuild package is missing, go with the apt-get.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.