Mysql 5.7.11 Source Installation method

Source: Internet
Author: User

Environment:
Centos 6.6 64-bit
MySQL 5.7.11

1. Install dependent packages

Yum Install GCC  Make Perl gcc autoconf automake zlib libxml libgcrypt libtool Bison

2, install the Boost library (the corresponding version above or below this version has a problem)

wget http://nchc.dl.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz tar zxvf  boost_1_59_0.  Tarmv boost_1_59_0/usr/local/boost

3. Add MySQL user group

Useradd MySQL

4. Download MySQL source package and install

wgethttp//cdn.mysql.com//downloads/mysql-5.7/mysql-5.7.11.tar.gzTarZXVF mysql-5.7. One.Tar. GZCD MySQL-5.7. OneCMake-dcmake_install_prefix=/home/mysql-dmysql_datadir=/home/mysql/data-ddefault_charset=utf8-ddefault_collation= utf8_general_ci-dmysql_tcp_port=3306-dmysql_user=mysql-dwith_myisam_storage_engine=1-dwith_innobase_storage_engine=1-dwith_archive_storage_engine=1-dwith_blackhole_storage_engine=1-dwith_memory_storage_engine=1-ddownload_boost=1-dwith_boost=/usr/local/Boost Make&& Make Install


5. Initialize the database

/home/mysql/mysqld--initialize--user=mysql--basedir=/home/mysql--datadir=/home/mysql/data

Note: The default password is generated after initialization, please log it down
2016-02-17t03:16:36.869627z 1 [Note] A temporary password is generated for [email protected]: kci!&lc?s8we

6. Adjust the configuration file

mv /etc/my.cnf/etc/my.cnf.bakCP /HOME/MYSQL/SUPPORT-FILES/MY-DEFAULT.CNF/ETC/MY.CNF

7. Start MySQL

/home/mysql/bin/mysqld_safe &

8. Accessing the database

Mysql-uroot-p

9, modify the default password (do not change the default password, will not be able to use SQL, must be modified)

' Root '@'localhost'123456';


Complete!

Problem:
A warning is encountered during compilation and does not affect compilation progress and is not known whether it can be ignored

Cc1plus: Warning: Unrecognized command-line option "-wno-unused-local-typedefs"

Reference Documentation:
Http://www.linuxidc.com/Linux/2015-12/126846.htm

Mysql 5.7.11 Source Installation method

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.