Source Installation mysql5.7.11

Source: Internet
Author: User

first, pre-preparatory work

1. Install the dependency package: Yum-y Install gcc-c++ ncurses-devel cmake make Perl

GCC autoconf automake zlib libxml libgcrypt libtool Bison

2, Prepare boost_1_59_0.tar.gz

tar zxvf boost_1_59_0.tar.gz

MV Boost_1_59_0/usr/local/boost

3. Create a MySQL account and give permissions to the installation directory

Second, install MySQL

1. Unzip the file: Tar-xf mysql-5.7.11.tar.gz

2. Configuration: CD mysql-5.7.11

Cmake-dcmake_install_prefix=/mydata/mysql

-dmysql_datadir=/mydata/mysql/data

-ddefault_charset=utf8

-ddefault_collation=utf8_general_ci

-dmysql_tcp_port=3306

-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

-dsysconfdir=/etc

3. Compiling and Installing: Make && make install

The original password will be recorded on the last line.

4, database initialization, into the database installation directory:

Cd/mydata/mysql/bin

./mysqld--initialize--user=mysql--basedir=/mydata/mysql--datadir=/mydata/mysql/data

5. Adjust the configuration file:

Mv/etc/my.cnf/etc/my.cnf.bak

Cp/mydata/mysql/support-files/my-default.cnf/etc/my.cnf

6. Modify the startup script:

CP Support-files/mysql.server/etc/init.d/mysqld

Chkconfig--add mysqld//Join random Start

Chkconfig mysqld on//valid at all levels

7, use the original password in the future to change the password.























Source Installation mysql5.7.11

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.