yum install cmake make ncurses-devel gcc-c++ bison
sudo apt-get install cmake libncurses5-dev g++ bison libssl-dev libxml2-dev libboost-dev
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.9.tar.gz
tar zxvf mysql-5.7.9.tar.gz
cd mysql-5.7.9
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DDOWNLOAD_BOOST=1 -DWITH_BOOST=$HOME/my_boost
make
make install
===========Step2:configure===================
useradd mysql
/usr/local/mysql/bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=./data
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
service mysqld start
chkconfig --add mysqld
chkconfig mysqld on
===========Step3:setpassword=================
/usr/local/mysql/bin/mysql -uroot -p -S/tmp/mysql.sock
status;
use mysql
SET PASSWORD = PASSWORD('123456');
truncate table user;
GRANT ALL PRIVILEGES ON *.* TO 'lerba'@'%' IDENTIFIED BY '123' WITH GRANT OPTION;
flush privileges;