参考文章 http://www.discuz.net/thread-2250084-1-1.html
1.安装相关库文件
yum install bison gcc gcc-c++ autoconf automake zlib* libxml* ncurses-devel libtool-ltdl-devel*
2.安装cmake
gmake install
3.设置用户
/usr/sbin/groupadd mysql (如果有提示已存在,并不是错误)
4.MYSQL 5.5.17
wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.17.tar.gz/from/http://mysql.ntu.edu.tw/
tar zxvf mysql-5.5.17.tar.gz
cd mysql-5.5.17
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mysql -DSYSCONFDIR=/etc/
make
make install
5.设置
cp ./support-files/my-huge.cnf /etc/my.cnf
vi /etc/my.cnf
在 [mysqld] 段增加
datadir = /data/mysql
wait-timeout = 30
max_connections = 512
max_connect_errors = 10000000
default-storage-engine = MyISAM
在 [mysqld] 段修改
max_allowed_packet = 16M
chkconfig --level 3 mysqld on
vi /etc/rc.d/init.d/mysqld
把basedir=编辑成basedir=/usr/local/mysql
把datadir=编辑成datadir=/data/mysql
service mysqld start
进入Mysql
bin/mysql -uroot -p