CentOS Compiler mysql5.6.16
One, download
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.16.tar.gz
TAR-ZXVF mysql-5.6.16.tar.gz
CD mysql-5.6.16
Second, 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_ci
Make && make install
Third, configuration && initialization
CP./SUPPORT-FILES/MY-DEFAULT.CNF/ETC/MY.CNF
Groupadd MySQL
useradd-g MySQL MySQL
Chown-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
Four, add to system services
CP./support-files/mysql.server/etc/rc.d/init.d/mysqld
chmod 700/etc/init.d/mysqld
Chkconfig--add mysqld
Chkconfig mysqld on