http://dev.mysql.com/doc/refman/5.5/en/installing-source-distribution.html
參考文章MySQL官方教程
安裝後使用supersmack測試記錄 對MYSQL進行壓力測試 http://blog.csdn.net/pengyouchuan/archive/2010/12/18/6084007.aspx
MySQL5.5源碼安裝和以前的5.1有區別,5.1使用autotool編譯,新版的5.5使用CMake編譯
需要先安裝cmake
http://www.cmake.org/cmake/resources/software.html
下載源碼包,安裝cmake方法和其他的安裝相同,解壓,配置,編譯,安裝
按照MySQL官方文檔進行,順利完成,根據自己的datadir安裝資料庫,我的安裝/home/mysql/data下
# Preconfiguration setup
shell> groupadd mysql
shell> useradd -r -g mysql mysql
# Beginning of source-build specific instructions
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> cmake .
shell> make
shell> make install
# End of source-build specific instructions
# Postinstallation setup
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
# Next command is optional
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysqld
shell> chkconfig --add mysqld
shell> chkconfig --level 2345 mysqld on
shell> service mysqld start