# # # #安装mysql -5.7.10
RPM-E--nodeps MySQL
Rpm-e mysqlclient10
Useradd-g mysql-s/sbin/nologin
Install_mysql_server ()
{
Cd/download/;unzip Boost_1_59_0.zip
Mkdir-p/usr/local/mysql/
Mkdir-p/data/mysqldata
Mkdir-p/usr/local/mysql/etc
TAR-ZXF mysql-5.7.10.tar.gz
CD mysql-5.7.10
CMake. -dcmake_install_prefix=/usr/local/mysql \
-dmysql_datadir=/data/mysqldata \
-dwith_boost=. /BOOST_1_59_0 \
-DSYSCONFDIR=/USR/LOCAL/MYSQL/ETC \
-dwith_innobase_storage_engine=1 \
-dwith_partition_storage_engine=1 \
-dwith_federated_storage_engine=1 \
-dwith_blackhole_storage_engine=1 \
-dwith_myisam_storage_engine=1 \
-denabled_local_infile=1 \
-denable_dtrace=0 \
-DDEFAULT_CHARSET=UTF8MB4 \
-DDEFAULT_COLLATION=UTF8MB4_GENERAL_CI \
-dwith_embedded_server=1
Make && make install
If [$?-ne 0]; Then
Echo-e "warnning \033[0;31;1m Mysql make error \033[0m failed."
Exit 10
Fi
Exit
Cd.. /
/bin/cp/downloads/my.cnf/usr/local/mysql/etc/
Ln-s/usr/local/mysql/etc/my.cnf/etc/
Chown-r Mysql:mysql/usr/local/mysql
Chown-r Mysql:mysql/data/mysqldata
Chown-r Mysql:mysql/var/lib/mysql
}
Install_mysql_server;
Lniux installation of MySQL----compiled version