1mysql source installation time to update

Source: Internet
Author: User

starting the Boost library from MySQL 5.7.5 is required

Download boost wget http://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz

Install boost

Note : Here if only for the installation of MySQL can actually not install, decompression is good, to install MySQL when the reference directory, but percona-xtrabackup need to use, so I installed.

Tar xzf boost_1_59_0.tar.gz

CD Boost_1_59_0

./bootstrap.sh

./B2 Install

1. Install dependent Packages

Yum-y install gcc gcc-c++ ncurses ncurses-devel cmake

2 Compile and install (download without boost to install)

CMake. \

-dcmake_install_prefix=/usr/local/mysql \

-dmysql_datadir=/usr/local/mysql/data \

-DSYSCONFDIR=/USR/LOCAL/MYSQL/ETC \

-ddownload_boost=1 \

-DWITH_BOOST=/USR/LOCAL/BOOST_1_59_0 \

-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


Description

-dcmake_install_prefix=/usr/local/mysql \ mysql location

-dmysql_datadir=/usr/local/mysql/data \ Database Store file location

-DSYSCONFDIR=/USR/LOCAL/MYSQL/ETC \mysql configuration directory

MySQL source installation without boost

-ddownload_boost=1 \ download BOOST

-DWITH_BOOST=/USR/LOCAL/BOOST_1_59_0 \ download BOOST location

MySQL source installation with boost

-dwith_boost=boost \ do not need to download, direct this

3 Copy the MySQL service startup configuration file

    1. cp/usr/local/mysql/support-files/my-default. cnf/etc/my.cnf

4 Initializing data

Bin/mysqld--initialize--user=mysql //localhost:fu2w&8xj3ir! // Create a table for the system database

Or

Bin/mysqld--initialize-insecure--user=mysql--basedir=/usr/local/mysql--datadir=/data/mysql/data

Bin/mysql_ssl_rsa_setup --user=mysql--basedir=/usr/local/mysql--datadir=/data/mysql/data

Note: before version mysql_install_db was under mysql_basedir/script ,5.7 was placed in the Mysql_ Install_db/bin directory, and has been deprecated

"–initialize" generates a random password (~/.mysql_secret), and "–initialize-insecure "Does not generate a password

–datadir cannot have data file under target directory

scripts/mysql_install_db--user=mysql--datadir=/data/mysqldb//// MySQL Authorization form created (old version)

5 starting the database

Bin/mysqld_safe--user=mysql &

6 Configuring the boot-up entry

Cp/usr/local/mysql/support-files/mysql.server/etc/init.d/mysql

chmod +x/etc/init.d/mysql

Chkconfig--add MySQL

Chkconfig mysqld on

Service MySQL Start

1mysql source installation time to update

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.