Just a quick not before I add this to the documentation set for the impatient people who want to start compiling MySQL 5.1.x

Just use this ./configure command line and you’ll be allright:

./configure --prefix=/usr/local/mysql \
--localstatedir=/usr/local/mysql/data \
--libexecdir=/usr/local/mysql/bin \
--libdir=/usr/local/mysql/lib \
--with-server-suffix=-standard \
--enable-thread-safe-client \
--enable-local-infile \
--enable-shared \
--with-zlib-dir=bundled \
--with-big-tables \
--with-readline \
--without-docs \

If you want to use other storage engines please add them on the last line. The possible engines are partition, daemon_example, ftexample, archive, blackhole, csv, example, federated, heap, innobase, myisam, myisammrg, ndbcluster. Please read the documentation for an explanation of all engines.

Follow a succesfull configure execution with ‘make‘ and ‘sudo make install‘ just like the regular installation.

After the installation restart MySQL and execute the command mysql_update to make sure all the databases are upgraded without problems.

If you want to compile PHP with this new version delete all the files that are not of the current date from /usr/local/mysql/lib and /usr/local/mysql/lib/mysql/.