linux 编译安装 mysql 5.5.8

1 下载软件

wget http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz

wget http://gd.tuwien.ac.at/db/mysql/Downloads/MySQL-5.5/mysql-5.5.8.tar.gz

2 安装

 tar xzvf cmake-2.8.3.tar.gz

cd cmake-2.8.3

./bootstrap

gmake

gmake install

cd mysql-5.5.8

cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql5  -DINSTALL_DATADIR=/usr/local/mysql5/data  -DDEFAULT_CHARSET=utf8  -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all  -DWITH_SSL=system -DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1 -DWITH_MYISAM_STORAGE_ENGINE=1

make

make install

cp ./support-files/my-medium.cnf /etc/my.cnf

cd /usr/local/mysql5/

chown -R mysql mysql5

chgrp -R mysql mysql5

/usr/local/mysql5/scripts/mysql_install_db --basedir=/usr/local/mysql5/ --user=mysql --datadir=/usr/local/mysql5/data/

/usr/local/mysql5/bin/mysqld_safe --user=mysql &

 

你可能感兴趣的:(mysql,数据库,linux,职场,休闲)