Useradd-m-s/sbin/nologin MySQL;
Yum-y install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* Mak e cmake;
Tar zxvf mysql-5.6.25.tar.gz; tar zxvf cmake-3.2.3.tar.gz
CD cmake-3.2.3;
./bootstrap;
Gmake;
make install;
Cd.. /mysql-5.6.25;
Cmake-dcmake_install_prefix=/opt/mysql/;make; make INSTALL
Chown-r Mysql.mysql/opt/mysql
Cd/opt/mysql/scripts
./mysql_install_db--user=mysql--basedir=/opt/mysql--datadir=/opt/mysql/data
Cd/opt/mysql/support-files
CP Mysql.server/etc/rc.d/init.d/mysqld
CP MY-DEFAULT.CNF/ETC/MY.CNF
Chkconfig--add mysqld
Chkconfig mysqld on
Chkconfig--level mysqld on
Cat << EOF >/ETC/MY.CNF
[Mysqld]
Datadir=/opt/mysql/data
Basedir=/opt/mysql
Socket=/var/lib/mysql/mysql.sock
User=mysql
Symbolic-links=0
[Mysqld_safe]
Log-error=/var/log/mysqld.log
Pid-file=/var/run/mysqld/mysqld.pid
Eof
/etc/init.d/mysqld start
/etc/init.d/mysqld restart
This article is from the "interested people, things become" blog, please be sure to keep this source http://wuxinglai.blog.51cto.com/9136815/1672022
MySQL 5.6.25 installation