Building MySql from sources has worked very well for me, at least once I got over a few humps. First, there are several non-default options to "configure" that you probably want to use. For example, by default, the "FEDERATED" storage engine isn't included. Second, there is additional software that's not installed by default with Redhat that's needed.
The guidance here works for MySql 5.1.33.
1. Get the source tree from mysql.com
2. cd mysql-X.XX
3. ./configure options
5. make install
Step (5) installs the mysql binaries to /usr/local/bin.
My "configure" options:
./configure --with-charset=utf8 --with-collation=utf8_general_ci --with-plugins=innobase,partition,archive,federated,heap,myisam,myisammrg --enable-local-infile --without-debug --enable-thread-safe-client --with-client-ldflags=-all-static
I'll explain why I use these particular options later on in this post.
Missing software problems:
1. "configure" fails complaining about "no curses/termcap library found"
Cure: yum install ncurses-devel
2. "make" fails because of missing g++
Cure: yum install gcc-c++
3. "make" (of innodb backend) fails due to missing file zlib.h
Cure: yum install zlib-devel
1. --with-charset=utf8 --with-collation=utf8_general_ci
Why: we got tired of having to jump through hoops when our data happens to contain
non-latin1 characters. These options make all db's utf8 by default.
Why: don't futz with plug-ins. Link things directly in. Should yield a bit of performance.
Why: without this, LOAD DATA LOCAL INFILE is disabled.
Why: should gain some performance.
Why: our clients can have multiple threads.
Why: should gain a bit of performance