Lniux installation of MySQL----compiled version

Source: Internet
Author: User

# # # #安装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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.