wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz
tar -zxvf mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz
mv mysql-5.6.33-linux-glibc2.5-x86_64 /usr/local/soft/mysql
groupadd mysql
useradd -g mysql mysql
cd /usr/local/soft/mysql
mkdir ./data/mysql
chown -R mysql:mysql ./
yum -y install perl perl-devel
yum -y install libaio-devel
yum -y install autoconf
./scripts/mysql_install_db --user=mysql --datadir=/usr/local/soft/mysql/data/mysql
cp support-files/mysql.server /etc/init.d/mysqld
cp support-files/my-default.cnf /etc/my.cnf
vi /etc/init.d/mysqld
设置数据存储位置和基本路径
basedir=/usr/local/soft/mysql/
datadir=/usr/local/soft/mysql/data/mysql
service mysqld start