October 25, 2014

Rebuilding MySQL Binary

Running RPM based or other packaged MySQL Binary you may have a problem if you would like to rebuild binary for some reason – change some build settings, apply some third party patches or simply try latest snapshot (This time I was both applying patches for Innodb scalability and Vadim’s patches to get proper slow query log). There are number of things as default paths and GCC build and link options you would like to keep the same as in original binary to minimize the change and finding this was not pleasant.

This time however Vadim advised me better solution – run mysqlbug script and get configure options from it. This is so easy.

After build is completed I simply take mysqld from sql directory and try it out as this is the only piece which I’m interested in. Quick to try, quick to rollback. You may run make install though if you need to but better to be ready to reinstall rpm after it :)

About Peter Zaitsev

Peter managed the High Performance Group within MySQL until 2006, when he founded Percona. Peter has a Master's Degree in Computer Science and is an expert in database kernels, computer hardware, and application scaling.

Comments

  1. jgabios says:

    I always wanted to compile mysql myself, but never had the guts for it because of their warning on their download page.
    Quote:
    “Source downloads
    For maximum stability and performance, we recommend that you use the binaries we provide.”
    is there a guide on how to tune mysql when compiling, or could you provide one on this performance blog?
    on my lamp server, i always compile everything myself, but mysql. I fear it would not perform well.

  2. peter says:

    Well,

    I think MySQL binaries were decent and fact everyone would have binaries compiled same way helped in troubleshooting bugs.

    No with no builds for Community binaries we’ll however all need to learn to compile MySQL or trust not so official builds :)

Speak Your Mind

*