MySQL database optimization recommended compilation of installation parameters summary

Source: Internet
Author: User

MySQL compilation parameters and complex, so that novice feel very head, if it is a formal environment installed MySQL, not enough time to study the meaning of each parameter, personal recommendations to use Yu Hongchun predecessors collation of the compilation parameters, convenient and efficient!

MySQL's online installation recommends a method of compiling the installation, this performance is greatly improved, the source package compilation parameters will default to DEBGU mode to generate binary code, and debug mode to the MySQL performance loss is relatively large, so when we compile ready to install the product code, Be sure not to forget to disable debug mode with the "-without-debug" parameter.

If you set the-with-mysqld-ldflags and-with-client-ldflags two compilation parameters to-all-static, you can tell the compiler to statically compile and compile the resulting code to get the highest performance.

The performance gap can be as much as 5% to 10% compared to using static compilation and dynamically compiled code.

The compilation parameters are as follows (suitable for 5.4 and previous versions):

/configure--prefix=/usr/local/mysql--without-debug--without-bench--enable-thread-safe-client- Enable-assembler--enable-profiling--enable-community-features--with-mysqld-ldflags=-all-static-- With-client-ldflags=-all-static--with-charset=utf8 #具体看网站环境决定默认编码--with-extra-charset=all--with-innodb # Personal blog can not open 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
1 2 3 4 5 6 7 8 9 a

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.