前端之家收集整理的这篇文章主要介绍了
centos6.x源码编译安装mysql5.6,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
yum install gcc gcc-c++ ncurses-devel perl
wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz
tar -xzvf cmake-2.8.10.2.tar.gz
cd cmake-2.8.10.2
./bootstrap
make && make install
wget http://ftp.gnu.org/gnu/bison/bison-2.5.tar.gz
tar zxvf bison-2.5.tar.gz
cd bison-2.5
./configure
make
make install
groupadd @R_403_198@
adduser -g @R_403_198@ @R_403_198@
chown -R @R_403_198@.@R_403_198@ /usr/local/@R_403_198@/
cd /usr/local/@R_403_198@-5.5
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/@R_403_198@ -D@R_403_198@_UNIX_ADDR=/usr/local/@R_403_198@/@R_403_198@.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -D@R_403_198@_DATADIR=/usr/local/@R_403_198@/data -D@R_403_198@_TCP_PORT=3306 -DENABLE_DOWNLOADS=1
make && make install
cd /usr/local/@R_403_198@
scripts/@R_403_198@_install_db --user=@R_403_198@ --datadir=/usr/local/data
/usr/local/@R_403_198@/scripts/@R_403_198@_install_db --user=@R_403_198@ --datadir=/usr/local/@R_403_198@/data --basedir=/usr/local/@R_403_198@ --collation-server=utf8_general_ci
cp /usr/local/@R_403_198@/support-files/my-default.cnf /etc/my.cnf
cp /usr/local/@R_403_198@/support-files/@R_403_198@.server /etc/init.d/@R_403_198@d
vi /etc/my.ini
[@R_403_198@d]
datadir = /data/@R_403_198@
socket = /tmp/@R_403_198@.sock
pid-file = /data/logs/@R_403_198@/@R_403_198@.pid
user = @R_403_198@
port = 3306
default_storage_engine = InnoDB
# InnoDB
#innodb_buffer_pool_size = 128M
#innodb_log_file_size = 48M
innodb_file_per_table = 1
innodb_flush_method = O_DIRECT
# MyISAM
#key_buffer_size = 48M
# character-set
character-set-server=utf8
collation-server=utf8_general_ci
# name-resolve
skip-host-cache
skip-name-resolve
# LOG
log_error = /data/logs/@R_403_198@/@R_403_198@-error.log
long_query_time = 1
slow-query-log
slow_query_log_file = /data/logs/@R_403_198@/@R_403_198@-slow.log
# Others
explicit_defaults_for_timestamp=true
#max_connections = 500
open_files_limit = 65535
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[client]
socket = /tmp/@R_403_198@.sock
port = 3306
vi /etc/profile
PATH=/usr/local/@R_403_198@/bin:/usr/local/@R_403_198@/lib:$PATH
service @R_403_198@d start
chkconfig --level 35 @R_403_198@d on
grant all privileges on *.* to root@"%" identified by '123456' with grant option;
flush privileges;