1、下载cmake(mysql编译软件)并安装
wget http://www.cmake.org/files/v2.8/cmake-2.8.7.tar.gz
cd cmake-2.8.7
./configure && make && make install
2、下载mysql
wget http://sourceforge.net/projects/mysql.mirror/files/MySQL-5.5.22-1.linux2.6.x86_64.tar
3、编译安装mysql
tar zxfv mysql-5.5.22.tar.gz
cd mysql-5.5.22
groupadd mysql
useradd -r -g mysql mysql
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/3306 -DWITH_INNOBASE_STORAGE_ENGINE=on -DMYSQL_TCP_PORT=3306 -DMYSQL_UNIX_ADDR=/data/3306/mysqld.sock -DENABLED_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DSYSCONFDIR=/etc/mysql/3306
make
make install
cd /usr/local/mysql/
chown -R mysql .
chgrp -R mysql .
scripts/mysql_install_db –user=mysql 初始化
cp support-files/my-medium.cnf /etc/mysql/3306/my.cnf
bin/mysqld_safe –user=mysql & 启动mysql
本文固定链接: http://www.test-life.org/?p=461 | 测试之路-My Test Space