系统:centOS6.5
mysql: 5.7.16
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz
groupadd mysql
useradd -r -g mysql -s /bin/false mysql
mkdir /data/mysql
chown –R mysql:mysql mysql
tar -xzvf mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz -C ../
mv mysql* mysql
chown –R mysql:mysql mysql
cd /usr/local/mysql/bin
./mysqld --defaults-file=/etc/my.cnf --initialize --user=mysql
mysqld_safe --defaults-file=/etc/my.cnf &
echo "PATH=$PATH:/usr/local/mysql/bin">>/etc/profile
alter user root@localhost identified by 'admin';