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