日期:2014-05-16  浏览次数:20821 次

在RHEL5 源码编译安装MySQL 5.5.23

?

1.安装前装备

1.1已经安装gcc(gcc-c++) make automake

1.2下载cmake:http://www.cmake.org/files/v2.8/cmake-2.8.8.tar.gz

1.3下载mysql:http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.23.tar.gz

?

2.安装cmake

tar zxvf cmake-2.8.8.tar.gz

cd cmake-2.8.8

./bootstrap

gmake

gmake install

?

3.安装mysql

tar xvf mysql-5.5.23.tar.gz

cd mysql-5.5.23/

cmake -DCMAKE_INSTALL_PREFIX=/home/iedm/mysql

make

make install

?

4 拷贝my.cnf文件

cd support-files/

cp my-huge.cnf /etc/my.cnf

cp mysql.server /etc/init.d/mysqld

?

5.初始化安装

/home/iedm/mysql/scripts/mysql_install_db

?

6.将mysql加入开启启动

chmod a+x /etc/init.d/mysqld

?

7.启动mysql

service mysqld start

?