Download the source code, compile and install.
installation Environment CentOS installation version: MySQL5. 6 /daan/mysql/5.6/daan/tools/mysql5. 6 (: http://mirrors.sohu.com/mysql/mysql-5.6/)
Linux
环境提示符修改
echo "export PS1=‘[\[email protected] \w]\$ ‘" >> /etc/profile
source /etc/profile
Modify Host Name
Vi/etc/sysconfig/network
Hostname #name
Routing
Vi/etc/hosts
Install dependent packagesYum Install–y CMakeYum Install–yGCCYum Install–yGCC-c++Yum Install–y BisonYum Install–y bison-develYum Install–y ncursesYum Install–y ncurses-develYum-YInstall Perl*(or directly execute YumInstall-YGCC GCC-c++ Bison bison-devel ncurses ncurses-devel cmakePerl*)
Add User mkdir -p/daan/mysql/5.6/-G mysql-m-s/sbin/nologin
Clean up the old installation environment. (if MySQL is not installed, do not execute) Make Clean RM -RF CMakeCache.txt
/daan/tools/mysql5. 6 /daan/tools/mysql5. 6 -dcmake_install_prefix=/daan/mysql/5.6make makeINSTALL/ daan/mysql/5.6chown -R mysql:mysql/daan/mysql/5.6
VI/etc/my.cnf (Delete all content, copy the following configuration [Mysql]default-character-set=Utf8[mysqld]datadir=/daan/mysql/5.6/Datasocket=/var/lib/mysql/Mysql.socklog-bin=mysql-Binserver-ID= $Innodb_flush_log_at_trx_commit=1Sync_binlog=1Pid_file=/var/lib/mysql/Mysql.pidinit_connect='SET collation_connection = utf8_general_ci'Init_connect='SET NAMES UTF8'character-set-server=utf8collation-server=Utf8_general_ciskip-character-set-client-Handshake#user=Port=3306#innodbdefault_storage_engine=innodbinnodb_buffer_pool_size=64minnodb_log_file_size=64minnodb_file_per_table=1#innodb_flush_method=0_direct#otherkey_buffer_size=64mlog_error=/daan/mysql/5.6/mysql-Error.logslow_query_log=/daan/mysql/5.6/mysql-slow.logtmp_table_size=64mmax_heap_table_size=64mquery_cache_type=0query_cache_size=0Open_files_limit=65535[Client]socket=/var/lib/mysql/Mysql.sockport=3306default-character-set=UTF8)
Install default library scripts/mysql_install_db--user=mysql--basedir=/daan/mysql/5.6/--datadir=/daan/mysql/ 5.6/data/mkdir /daan/mysql/5.6/init.dcp Support-files/mysql.server/ daan/mysql/5.6/init.d/mysqlchown -Rroot/daan/mysql/5.6chown -R MySQL Data
start mysqlinit.d/mysql startLn -S /daan/mysql/5.6/bin/mysql/usr/ Local/bin/mysql
open MySQL port firewall-cmd--zone=public--add-port=3306/tcp--Permanentfirewall
' Root '@'%'root'--host= $ip-uroot-p
System Services CP /daan/mysql/5.6/init.d/mysql/etc/init.d/--add mysqlchkconfig mysql Offservice MySQL stopservice mysql start
Download mysql5.6 source code to install under Linux