Mysql 5.7.9 Source Code installation

Source: Internet
Author: User

Groupadd-r MySQL && useradd-r-g mysql-s/bin/false-m MySQL

Yum-y Install Ncurses-devel ncurses

wget-c http://git.typecodes.com/libs/ccpp/cmake-3.2.1.tar.gz

Tar zxvf cmake-3.2.1.tar.gz && cd cmake-3.2.1&&./configure && make && make install

wget-c http://git.typecodes.com/libs/ccpp/bison-3.0.tar.gz

Tar zxvf bison-3.0.tar.gz && bison-3.0 &&./configure && make && make install

Wget-c http://pkgs.fedoraproject.org/repo/pkgs/boost/boost_1_59_0.tar.bz2/6aa9a5c6a4ca1016edd0ed1178e3cb87/ boost_1_59_0.tar.bz2

Tar jxvf boost_1_59_0.tar.bz2

CD Boost_1_59_0

./bootstrap.sh

./B2 Stage Threading=multi link=shared

./B2 Install threading=multilink=shared


Wget–c http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.9.tar.gz

Tar zxvfmysql-5.7.9.tar.gz

CD mysql-5.7.9

mkdir Project

CMake. -DCMAKE_INSTALL_PREFIX=/USR/LOCAL/MYSQL-DMYSQL_DATADIR=/DATA/MYSQL/DATA-DSYSCONFDIR=/ETC \

-dmysql_user=mysql-dwith_myisam_storage_engine=1-dwith_innobase_storage_engine=1 \

-dwith_archive_storage_engine=1-dwith_memory_storage_engine=1-dwith_readline=1 \

-dmysql_unix_addr=/tmp/mysql.sock-dmysql_tcp_port=3306-denabled_local_infile=1 \

-denable_downloads=1-dwith_partition_storage_engine=1-dextra_charsets=all-ddefault_charset=utf8 \

-ddefault_collation=utf8_general_ci-dwith_debug=0-dmysql_maintainer_mode=0-dwith_ssl:string=bundled-dwith_zlib : string=bundled

Make && make install

Echo-e ' \n\nexport path=/usr/local/mysql/bin: $PATH \ n ' >>/etc/profile && source/etc/profile

Cd/usr/local/mysql

Chown Mysql.mysql. -R

Mkdir-p/data/mysql/data

Mkdir-p/data/mysql/log

Mkdir-p/data/mysql/innodb/data

Mkdir-p/data/mysql/innodb/log

Chown Mysql.mysql/data/mysql-r

Cd/usr/local/mysql/bin

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

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

chmod +x/etc/init.d/mysqld

Chkconfig--add mysqld

/etc/init.d/mysqld start

Mysql_secure_installation


Note: my.cnf need to be placed in the/etc/directory


This article is from the "I am a Little bird" blog, please make sure to keep this source http://2242558.blog.51cto.com/2232558/1709666

Mysql 5.7.9 Source Code installation

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.