Summary of compilation and installation parameters recommended for MySQL database Optimization

Source: Internet
Author: User

Summary of compilation and installation parameters recommended for MySQL database Optimization

MySQL compilation parameters are many and complex, which makes new users feel very proud. If MySQL is installed in a formally generated environment, there is not enough time to study the meaning of each parameter, I personally suggest using compilation parameters compiled by Yu hongchun, which is convenient and efficient!

We recommend that you compile and install MySQL for online installation. This greatly improves the performance. The compilation parameters of the source code package will generate binary code in Debgu mode by default, the Debug mode causes a high performance loss to MySQL. Therefore, when compiling the product code to be installed, do not forget to use the "-without-debug" parameter to disable the Debug mode.

If you set the compilation parameters-with-mysqld-ldflags and-with-client-ldflags to-all-static, it can tell the compiler to compile and compile the result code in static mode to achieve the highest performance.

Compared with code that uses static compilation and dynamic compilation, the performance gap may reach 5% to 10%.

The compilation parameters are as follows (applicable to versions 5.4 and earlier ):

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

./Configure -- prefix =/usr/local/mysql \

-- Without-debug \

-- Without-example \

-- Enable-thread-safe-client \

-- Enable-Cycler \

-- Enable-profiling \

-- Enable-community-features \

-- With-mysqld-ldflags =-all-static \

-- With-client-ldflags =-all-static \

-- With-charset = utf8 \ # depending on the website environment, the default encoding is determined.

-- With-extra-charset = all \

-- With-innodb \ # A personal blog may not enable innodb

-- With-csv-storage-engine \

-- With-federated-storage-engine \

-- With-mysqld-user = mysql \

-- Without-embedded-server \

-- With-server-suffix =-community \

-- With-unix-socket-path =/usr/local/mysql/sock/mysql. sock

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.