System environment: CentOS 6.2 64-bit
Kernel version: 2.6.32-220.el6.x86_64
MySQL version: 5.1.62
1, 1 first create MySQL users and groups:
[ROOT@CQB ~]# Groupadd MySQL
[ROOT@CQB ~]# useradd-s/sbin/nologin-g mysql-m MySQL
1, 2 download the MySQL source package after decompression installation.
[ROOT@CQB ~]# wget http://mysql.ntu.edu.tw/Downloads/MySQL-5.1/mysql-5.1.62.tar.gz
[ROOT@CQB ~]# tar zxvf mysql-5.1.62.tar.gz
[ROOT@CQB ~]# CD mysql-5.1.62
[ROOT@CQB mysql-5.1.62]#./configure--prefix=/usr/local/mysql--enable-assembler--enable-thread-safe-client-- With-mysqld-user=mysql--with-big-tables--without-debug--with-pthread--with-extra-charsets=complex-- With-readine--with-ssl--with-embedded-server--enable-local-infole--with-plugin=partition,innobase-- With-plugin-plugin--with-mysqld-ldflags=-all-static--with-client-ldfags=-all-static
[ROOT@CQB mysql-5.1.62]# make && make install
1, 3 mysql parameter description:
--prefix=/usr/local/mysql #指定mysql的安装路径
--enable-assembler #允许使用汇编模式 (optimized performance)
--enable-thread-safe-client #以线程方式编译mysql
--with-mysqld-user=mysql #指定mysql运行的系统的用户
--with-big-tables #支持大表, even 32-bit systems can support more than 4G of tables
--without-debug #使用非debug模式
--with-pthread #强制使用pthread线程库编译
--with-extra-charsets=complex #mysql默认的字符集使用complex
--with-ssl #支持ssl
--with-plugin=partition,innobase
--with-plugin-plugin
--with-mysqld-ldflags=-all-static #服务器使用静态库 (optimized performance)
--with-client-ldfags=-all-static #客户端使用静态库 (optimized performance)
More parameters see the source directory install or./configure--help