Install MySQL 5.6.22 source code
1, Configuration Yum/epel
2. Installation of the basic environment
Yum-y install NTP make OpenSSL openssl-devel pcre pcre-devel libpng libpng-devel libtiff-devel libjpeg-6b libjpeg-devel-6 b freetype freetype-devel gd gd-devel fontconfig-devel zlib zlib-devel libevent-devel gcc gcc-c++ Flex Bison bzip2-devel L IBXPM libxpm-devel ncurses ncurses-devel libmcrypt libmcrypt-devel libxml2 libxml2-devel imake autoconf automake Screen sy Sstat compat-libstdc++-33 Curl Curl-devel
3, the establishment of relevant users, directories, decompression and installation
#groupadd MySQL
#useradd mysql-g MySQL
#mkdir-pv/opt/mysql/data
#tar FXZ mysql-5.6.22.tar.gz
#cd mysql-5.6.22
#cmake \
-dcmake_install_prefix=/opt/mysql \
-dmysql_datadir=/opt/mysql/data \
-DSYSCONFDIR=/ETC \
-dwith_myisam_storage_engine=1 \
-dwith_innobase_storage_engine=1 \
-dwith_memory_storage_engine=1 \
-dwith_readline=1 \
-dmysql_unix_addr=/var/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
#rm-F/ETC/MY.CNF
#mv/opt/mysql/my.cnf/etc/
#cp/opt/mysql/support-files/mysql.server/etc/init.d/mysql
#chkconfig--add MySQL
#chkconfig MySQL--levels 2345 on
#chown-R Mysql.mysql/opt/mysql
#service MySQL Start
4, Sercurity
-A input–m state--state new–m tcp–p–dport 22–j ACCEPT
-A INPUT m state--state NEW m TCP p dport 3306 J ACCEPT
Install MySQL 5.6.22 source code