1.下载mysql
选择源代码版(Generic Linux ...Compressed TAR Archive)
2.安装必要的组件
yum -y install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* make cmake
3.
groupadd mysql
useradd -r -g mysql mysql
passwd mysql
tar -zxvf mysql*.tar.gz
cd mysql-5.6.13
cmake .
make;make install
4.安装路径默认在/usr/local/mysql下
chown -R mysql.mysql /usr/local/mysql
cd /usr/local/mysql/scripts
./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
cd /usr/local/mysql/support-files
cp mysql.server /etc/init.d/mysql
cp my-default.cnf /etc/my.cnf
....................
chkconfig -add mysql
chkconfig mysql on
service mysql start