In centos, MySQL 5.5.11 CMake Installation notes the latest mysql versions require cmake compilation and installation. It is estimated that this method will be used in later versions. Therefore, we will record the installation steps and procedures for your reference. Note: This installation is the default centos has installed the latest toolkit, such as GNU make, GCC, Perl, libncurses5-dev, if there is a missing toolkit found during the compilation and installation process, first, download and install yum install separately before continuing. Www.2cto.com 1. centos with wget download required software, save to the directory/usr/local/src/wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.11.tar.gz/from/http://mysql.he.net/wget http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gzwget http://ftp.gnu.org/gnu/bison/bison-2.4.3.tar.gzii. install the cd cmake-2.8.4.tar.gz for cmakmcm/usr/local/srctar zxvf cmake-2.8.4. /bootstrap gmake install cd .. /tar zxvf bison-2.4.3.tar.gz cd bison-2.4.3. /configure make installcd ../
III. compile and install MySQL 5.5.11/usr/sbin/groupadd mysql/usr/sbin/useradd-g mysql tar xvf mysql-5.5.11.tar.gz cd mysql-5.5.11/cmake-DCMAKE_INSTALL_PREFIX =/usr/local/mysql \-DMYSQL_UNIX_ADDR =/tmp/mysql. sock \-DDEFAULT_CHARSET = utf8 \-DDEFAULT_COLLATION = utf8_general_ci \-DWITH_EXTRA_CHARSETS: STRING = utf8, gbk \-records = 1 \-records = 1 \-records = 1 \-DWITH_READLINE = 1 \-DENABLED_LOCAL_INFILE = 1 \-DMYSQL_DATADIR =/var/mysql/data \-DMYSQL_USER = mysql make install chmod + w/usr/local/mysql chown-R mysql: mysql/usr/local/mysql ln-s/usr/local/mysql/lib/libmysqlclient. so.16/usr/lib/libmysqlclient. so.16mkdir-p/var/mysql/mkdir-p/var/mysql/data/mkdir-p/var/mysql/log/chown-R mysql: mysql/var/mysql/cdsupport-files/cpmy-large.cnf/var/mysql/my. cnfcp mysql. server/etc/init. d/mysqld
4. configure to start MySQL 5.5.111. if necessary, modify the mysql configuration first. cnfvi/var/mysql/my. cnf2. mysql initial installation/usr/local/mysql/scripts/mysql_install_db \ -- defaults-file =/var/mysql/my. cnf \ -- basedir =/usr/local/mysql \ -- datadir =/var/mysql/data \ -- user = mysql
3. add mysql to start chmod + x/etc/init. d/mysqld vi/etc/init. d/mysqld (edit this file, find and modify the following variables: basedir =/usr/local/mysql datadir =/var/mysql/datachkconfig -- add mysqld chkconfig -- level 345 mysqld on 4. start mysqlservice mysqld start