-------start blogging, hope to work and daily learning some of the knowledge and experience to share with you!
After Mysql5.5, installing MySQL using the source package will need to be compiled CMake way. The following sections describe the steps to install MySQL by CMake:
One: Prepare before installation.
1: Check the system for presence MySQL users and groups.
# grep "MySQL"/etc/passwd
2 : If present, delete MySQL users and groups.
# userdel-r MySQL
#groupdel-R MySQL
3: Create MySQL users and groups.
# groupadd-g MySQL
#useradd-u 27-g mysql-d/dev/null/-s/sbin/nologin MySQL
4: Create a data store directory.
#mkdir-P/mydata
Two: Download mysql5.5 with the CMake source package, and unzip.
# wget Http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.25a.tar.gz-P/usr/ local/src/
#wget http://wwwNaNake.org/files/v2.8/cmake-2.8.4.tar.gz-P/usr/local/src/
#cd/usr/local/src/
#tar-zxvf mysql-5.5.25a.tar.gz
#tar-zxvf cmake-2.8.4.tar.gz
Three: Compile and install CMake tools.
# cd cmake-2.8.4
#./configure--prefix=/usr/local/cmake
#make&& make install
Four: Using CMake Tool Installation MySQL 5.5
# Exportpath= $PATH: $HOME/bin:/usr/local/cmake/bin: $PATH
# cmake . -dcmake_install_prefix=/usr/local/mysql5.5.25-dmysql_datadir=/mydata- Dmysql_unix_addr=/tmp/mysql.sock-dwith_innobase_storage_engine=1-dmysql_tcp_port=3306-dextra_charsets=all- Ddefault_charset=utf8-ddefault_collation=utf8_general_ci-dwith_debug=0
#make –j 3 && make install
V: Initialize MySQL .
# cd/usr/local/src/mysql-5.5.25a
#CP support-files/my-large.cnf/etc/my.cnf
#CP support-files/mysql.server/etc/init.d/mysqld
#chmod +x/etc/init.d/mysqld
#chkconfig--add mysqld
#sh./scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql5.5.25/--datadir=/ mydata/
#chown-r mysql.mysql/usr/local/mysql5.5.25
#Ulimit-s Unlimited
Six: Start up MySQL .
#service mysqld Restart
This article is from the Linux OPS blog, so be sure to keep this source http://icenycmh.blog.51cto.com/4077647/1671550
MySQL Source package installation (mysql5.5)