MySQL 编译5.6

yum -y install make gcc-c++ cmake bison-devel  ncurses-devel
wget  http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.28.tar.gz
tar xf mysql-5.6.28.tar.gz
cd mysql-5.6.28
[root@166087 5.6]# cmake \
-DCMAKE_INSTALL_PREFIX=/application/mysql/5.6 \
-DMYSQL_DATADIR=/data/mysql \
-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=utf8mb4 \
-DDEFAULT_COLLATION=utf8mb4_general_ci

[root@166087 5.6]# scripts/mysql_install_db --basedir=/application/mysql5.6 --datadir=/data/mysql --user=mysql

[root@166087 ~]# mysql -S /var/lib/mysql/mysql.sock


你可能感兴趣的:(MySQL 编译5.6)