CentOS 6.5环境源码编译安装MySQL 5.6.34

CentOS 6.5环境源码编译安装MySQL 5.6.34 过程详解。


源码下载地址http://dev.mysql.com/downloads/mysql/5.6.html#downloads

CentOS 6.5环境源码编译安装MySQL 5.6.34
选择Generic Linux (Architecture Independent), Compressed TAR Archive

CentOS 6.5环境源码编译安装MySQL 5.6.34
选择 No thanks, just start my download. 开始下载

CentOS 6.5环境源码编译安装MySQL 5.6.34
操作系统:
centos6.5 x86_64

一、yum安装相关依赖
# yum -y install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* make cmake bison git openssl openssl-devel

二、编译安装


1.添加用户
groupadd mysql
useradd -r -g mysql mysql

2.编译安装

tar xf mysql-5.6.34.tar.gz
cd mysql-5.6.34


#默认情况下是安装在/usr/local/mysql


# cmake编译参数可以自己调整
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mydata -DSYSCONFDIR=/etc -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DWITH_SSL=system -DWITH_ZLIB=system -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DMYSQL_TCP_PORT=3306 -DENABLED_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DWITH_LIBWRAP=0 -DDEFAULT_COLLATION=utf8_general_ci

相关推荐