1, install mysql5.5 and 5.5 or more need to install CMake
1) Download CMake
wget--no-check-certificate http://www.cmake.org/files/v2.8/cmake-2.8.7.tar.gz
2) Unzip the build installation
Install the packages that you depend on first:
Yum-y Install gcc*
Tar zvxf cmake-2.8.7.tar.gz
CD cmake-2.8.7
./configure
Make && make install
2. Install MySQL
1) Download MySQL
wget http://mirrors.sohu.com/mysql/MySQL-5.5/mysql-5.5.47.tar.gz
2) Create MySQL user and user group
Groupadd MySQL
useradd-g MySQL MySQL
3) Unzip the installation
Tar zvxf mysql-5.5.47.tar.gz
CD mysql-5.5.47
Compile with CMake:
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=1
Make && make install
4) Create a new MySQL permissions table
Mkdir-p/mysql/data
./scripts/mysql_install_db--user=mysql-datadir=/mysql/data
#此处如不指定datadir, the error will be at startup
5) Permission settings
Cd/usr/local/mysql
Chown-r Mysql:mysql/usr/local/mysql
Chown-r Root.
Chown-r MySQL Data
CP SUPPORT-FILES/MY-MEDIUM.CNF/ETC/MY.CNF
/usr/local/mysql/bin/mysqld_safe--user=mysql &
CP Support-files/mysql.server/etc/init.d/mysqld
chmod +x/etc/init.d/mysqld
/etc/init.d/mysqld start
6) Verification
/usr/local/mysql/bin/mysql
Select @ @version
This article is from the "Linux" blog, so be sure to keep this source http://syklinux.blog.51cto.com/9631548/1759080
MySQL 5.5 Installation