MySQL 5.7.18 Source Code Installation

Source: Internet
Author: User

1 Downloads

1.1 Download URL: www.mysql.com

1.2 Download method

1.2.1 Enter the homepage, select DOWNLOADS , and we are in the download page. As shown in the download URL https://www.mysql.com/downloads/

1.2.2 Go to the download page, you can see a lot of products, here we pull the scroll bar to the bottom. What we want to download is MySQL Community Edition (GPL)

1.2.3 after entering MySQL community. Selecting operating System Select Source Code; version according to everyone's needs, here we choose Generic Linux.

1.2.4 Here we see there are two resource for us to download. Download includes Boost Headersis recommended here.

Note:boost is an extension of the C + + development Library, designed to standardize the C + + library for cross-platform use. Here we mainly compile MySQL code with it.


2 compiling

2.1 Decompression

TAR-ZXVF mysql-boost-5.7.18.tar.gz

2.2 Compiling

2.2.1 Creating a compilation project

CD MYSQL-5.7.18-SRC

mkdir BLD

CMake. -ddownload_boost=0-dwith_boost=. /boost/-dmysql_datadir=/mysqldb/mysql-5.7.18/data

Note1:cmake-(cross platform make) is a platform-based compilation tool that is used primarily to generate makefile or project files. Only the CMake configuration file is named CMakeLists.txt.

Note2:cmake in compiling MySQL has a lot of option and can be viewed by MySQL official.

2.2.2 Compiling

Make


3 Installation

3.1 Make Install

Note: Since we did not specify the installation directory for MySQL when we generated project CMake, you can view the MySQL installation directory after the installation is complete.

4 initialization

cd/mysqldb/mysql-5.7.18

chown -R mysql .
      chgrp -R mysql .
      bin/mysql_install_db --user=mysql# before MySQL 5.7.6
      bin/mysqld --initialize --user=mysql# MySQL 5.7.6 and up

Note: After initialization is complete, MySQL will create an initialized password for [email protected].


5 Start

bin/mysqld_safe--user=mysql &


This article from "12398798" blog, declined reprint!

MySQL 5.7.18 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.