Compile mysql5616 in Centos and download wgethttp: devmysqlcomgetDownloadsMySQL-
Compile mysql5.6.16 in Centos
1. Download
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.16.tar.gztar -zxvf mysql-5.6.16.tar.gzcd mysql-5.6.16
2. Compile
cmake \-DCMAKE_INSTALL_PREFIX=/data/apps/mysql5.6.16 \-DMYSQL_DATADIR=/data/mysqldata \-DSYSCONFDIR=/etc -DWITH_MYISAM_STORAGE_ENGINE=1 \-DWITH_INNOBASE_STORAGE_ENGINE=1 \-DWITH_MEMORY_STORAGE_ENGINE=1 \-DWITH_READLINE=1 \-DMYSQL_UNIX_ADDR=/tmp/mysql.sock \-DMYSQL_TCP_PORT=3306 \-DENABLED_LOCAL_INFILE=1 \-DWITH_PARTITION_STORAGE_ENGINE=1 \-DEXTRA_CHARSETS=all \-DDEFAULT_CHARSET=utf8 \-DDEFAULT_COLLATION=utf8_general_cimake && make install
3. configuration & initialization
cp ./support-files/my-default.cnf /etc/my.cnfgroupadd mysqluseradd -g mysql mysqlchown -R mysql:mysql /data/apps/mysql5.6.16/data/apps/mysql5.6.16/scripts/mysql_install_db --user=mysql --basedir=/data/apps/mysql5.6.16 --datadir=/data/mysqldata/data/apps/mysql5.6.16/bin/mysqld_safe --user=mysql &/data/apps/mysql5.6.16/bin/mysqladmin -uroot password mypassword
4. add to system service
cp ./support-files/mysql.server /etc/rc.d/init.d/mysqldchmod 700 /etc/init.d/mysqldchkconfig --add mysqldchkconfig mysqld on