Install the necessary libraries first
Yum-y Install gcc*
###### Install MYSQL ######
first install camke
One, Yum is supported,
Yum Install-y CMake
Second, the source can also be installed
cd/usr/local/src# download Cmakewget Http://www.cmake.org/files/v2.8/cmake-2.8.7.tar.gztar zxvf CMAKE-2.8.7.TAR.GZCD cmake-2.8.7# Installing Cmake./configuremakemake Install
install MYSQL
download MYSQL5.5 version of Linux under the source package
HTTP://DEV.MYSQL.COM/DOWNLOADS/
install
Groupadd mysqluseradd-g mysql mysqltar zxvf mysql-5.2.25.tar.gzcd mysql-5.2.25
#cmake . //installed by default, the installation directory is/usr/local/ mysql Data Directory is/usr/local/mysql/data
#也可以指定参数安装, such as specifying UTF8, data engine, etc.
#具体参照 http://dev.mysql.com/doc/refman/... ration-options.html
Cmake-dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/mysql/data-ddefault_charset=utf8-ddefault_ Collation=utf8_general_ci-dwith_extra_charsets:string=all-dwith_debug=0-dwith_ssl=yes-dwith_readline=1- Denabled_local_infile=1echo $?makeecho $?make installecho $?cd/usr/local/mysql chown-r mysql:mysql/usr/local/mysql. scripts/mysql_install_db--user=mysql-datadir=/mysql/data# If you do not specify DataDir here, you will get an error chown-r root when booting. chown-r MySQL DATACP Support-files/my-medium.cnf/etc/my.cnfbin/mysqld_safe--user=mysql &# Next command is OPTIONALCP Support-files/mysql.server/etc/init.d/mysqldchmod +x/etc/init.d/mysqld/etc/init.d/mysqld Start
Here, the installation is complete
This article is from "Xiao Yang" blog, please be sure to keep this source http://aqiang.blog.51cto.com/6086626/1895543
MYSQL5.5 source installed under Linux