1、解压软件
1.# tar -zxvf mysql-5.6.12.tar.gz -C /tmp
2、设置编译参数
Centos6.4乘64编译安装MYSQL5.6.12教程图2
01.# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
02.-DMYSQL_DATADIR=/usr/local/mysql/data \
03.-DDEFAULT_CHARSET=utf8 \
04.-DDEFAULT_COLLATION=utf8_general_ci \
05.-DWITH_EXTRA_CHARSETS:STRING=all \
06.-DWITH_MYISAM_STORAGE_ENGINE=1 \
07.-DWITH_INNOBASE_STORAGE_ENGINE=1 \
08.-DWITH_MEMORY_STORAGE_ENGINE=1 \
09.-DWITH_READLINE=1 \
10.-DENABLED_LOCAL_INFILE=1 \
11.-DWITH_SSL=system \
12.-DWITH_EMBEDDED_SERVER=1 \
13.-DWITH_READLINE=1 \
14.-DMYSQL_USER=mysql
3、装置
1.# make && make install
三、装备
1、为装置目录与数据目录赋予权限
1.# chown -R mysql:mysql /usr/local/mysql/
2、执行初始化脚本
1.# /usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql
3、第一次发动MySQL
1.# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
2.# chmod +x /etc/init.d/mysqld
3.# service mysqld start //发动mysql服务
4.# chkconfig --add mysqld //
5.# chkconfig mysqld on //mysql服务每次开机自动发动
Centos6.4乘64编译安装MYSQL5.6.12教程图3
4、装备环境变量