Mysql 5.5.x and mysql compilation parameters in earlier versions

Source: Internet
Author: User

From mysql5.5 onwards, MySQL source code installation began to use cmake. The following is a comparison between mysql 5.5 and previous parameters:


1. Command syntax: clear the old object file and cache information when re-compiling.
# Make clean
# Rm-f CMakeCache.txt
2. Installation options
The CMAKE_INSTALL_PREFIX value is the basic directory for installation. Other cmake option values do not include the prefix or relative path name. The absolute path includes the CMAKE_INSTALL_PREFIX path. For example, the absolute path of-DINSTALL_SBINDIR = sbin is/usr/local/mysql/sbin.
3. Storage engine options
The mysql storage engine is plug-in-type, so the plug-in control option can specify the storage engine for installation.
Configure compilation plug-in options -- with-plugins = csv, myisam, myisammrg, heap, innobase,
Archive and blackhole do not directly correspond to the same option in cmake. For csv, myisam, myisammrg, and heap, you do not need to specify the name of the storage engine in cmake because they are mandatory for installation.
 
You can use the following options to install the innodb, archive, and blackhole storage engines.
-DWITH_INNOBASE_STORAGE_ENGINE = 1
 
-DWITH_ARCHIVE_STORAGE_ENGINE = 1
 
-DWITH_BLACKHOLE_STORAGE_ENGINE = 1
 
(1 can be replaced by on)
 
If it is neither-DWITH _ <ENGINE> _ STORAGE_ENGINE nor-DWITHOUT _ <ENGINE> _ STORAGE_ENGINE to specify the storage ENGINE, the storage ENGINE will be installed as a shared modular storage ENGINE. If it is not shared modular, it will be excluded. You must use the install plugin statement or -- plugin-load to INSTALL the shared module.
 
4. Other options
In the past, most MySQL compilation options were supported. The installation options of the new and old versions are mapped to uppercase letters, and the front dashes of the delete option are replaced with underscores. For example:
-- With-debug => WITH_DEBUG = 1
 
-- With-embedded-server => WITH_EMBEDDED_SERVER
 
5. Debug the configuration process
After the configure is compiled, the config. log and config. status files are generated.
After cmake is compiled, the CMakeError. log and CMakeOutput. log files are generated in the CMakeFiles directory.
 
For compilation parameters, refer:
 
BUILD_CONFIG uses the consistent compilation parameters of the official release.
CMAKE_BUILD_TYPE specifies the product Compilation instruction information RelWithDebInf
CMAKE_INSTALL_PREFIX specifies the MySQL installation path/usr/local/mysql
CPACK_MONOLITHIC_INSTALL whether to create a single installation package file OFF 5.5.7
DEFAULT_CHARSET MYSQL default character set latin1 5.5.7
DEFAULT_COLLATION MYSQL default sorting character set latin1_swedish_ci 5.5.7
ENABLE_DEBUG_SYNC whether to enable synchronization debugging ON 5.5.7
ENABLE_DOWNLOADS whether to download optional files OFF 5.5.7
Whether ENABLE_DTRACE contains DTrace 5.5.7
Whether ENABLE_GCOV contains Gcov support 5.5.14
ENABLED_LOCAL_INFILE whether to enable local load data infile off 5.5.7
ENABLED_PROFILING enable code query analysis ON 5.5.7
INSTALL_BINDIR MySQL main execution file directory PREFIX/bin 5.5.7
INSTALL_DOCDIR file installation path PREFIX/docs 5.5.7
INSTALL_DOCREADMEDIR README file directory PREFIX 5.5.7
INSTALL_INCLUDEDIR header file directory PREFIX/include 5.5.7
INSTALL_INFODIR PREFIX/docs 5.5.7
INSTALL_LAYOUT select the predefined installation STANDALONE 5.5.7
INSTALL_LIBDIR library file directory PREFIX/lib 5.5.7
INSTALL_MANDIR manual page directory PREFIX/man 5.5.7
Install_mysql1_dir shared data directory PREFIX/share 5.5.7
INSTALL_MYSQLTESTDIR mysql-test directory PREFIX/mysql-test 5.5.7
INSTALL_PLUGINDIR plug-in directory PREFIX/lib/plugin 5.5.7
INSTALL_SBINDIR super user execution file directory PREFIX/bin 5.5.7
INSTALL_SCRIPTDIR script directory PREFIX/scripts 5.5.7
Install_1_dir aclocal/mysql. m4 installation directory PREFIX/share 5.5.7
INSTALL_SQLBENCHDIR SQL-plugin performance testing tool directory PREFIX 5.5.7
INSTALL_SUPPORTFILESDIR extension supports file directories PREFIX/support-files 5.5.7
MYSQL_DATADIR database storage directory 5.5.7
Whether MYSQL_MAINTAINER_MODE enables MySQL maintenance environment OFF 5.5.7
MYSQL_TCP_PORT TCP/IP port number 3306 5.5.7
MYSQL_UNIX_ADDR Unix Socket file/tmp/mysql. sock 5.5.7
SYSCONFDIR option configuration file directory 5.5.7
WITH_COMMENT compilation environment comments 5.5.7
Whether WITH_DEBUG includes debugging support OFF 5.5.7
Whether to establish an embedded server with WITH_EMBEDDED_SERVER OFF 5.5.7
WITH_xxx_STORAGE_ENGINE static compilation xxx storage engine to server 5.5.7
Additional character sets, including all 5.5.7
Does WITH_LIBWRAP support libwrap (TCP packaging) OFF 5.5.7?
WITH_READLINE use the bundled readline OFF 5.5.7
Does WITH_SSL support SSL no 5.5.7?
Does WITH_ZLIB support Zlib system 5.5.7?

 











Configure Command CMake Command
./Configure Cmake.
./Configure -- help Cmake.-LH or ccmake.

 

























































Parameter Configure Option CMake Option CMake Notes
Installation base directory -- Prefix =/usr -DCMAKE_INSTALL_PREFIX =/usr
Mysqld directory -- Libexecdir =/usr/sbin -DINSTALL_SBINDIR = sbin Interpreted relative to prefix
Data directory -- Localstatedir =/var/lib/mysql -DMYSQL_DATADIR =/var/lib/mysql
Config directory (for my. cnf) -- Sysconfdir =/etc/mysql -DSYSCONFDIR =/etc/mysql
Plugin directory -- With-plugindir =/usr/lib64/mysql/plugin -DINSTALL_PLUGINDIR = lib64/mysql/plugin Interpreted relative to prefix
Man page directory -- Mandir =/usr/share/man -DINSTALL_MANDIR = share/man Interpreted relative to prefix
Shared-data directory -- Sharedstatedir =/usr/share/mysql -Dinstall_1_dir = share This is where aclocal/mysql. m4 shoshould be installed
Library installation directory -- Libdir =/usr/lib64/mysql -DINSTALL_LIBDIR = lib64/mysql Interpreted relative to prefix
Header installation directory -- Includedir =/usr/include/mysql -DINSTALL_INCLUDEDIR = include/mysql Interpreted relative to prefix
Info doc directory -- Infodir =/usr/share/info -DINSTALL_INFODIR = share/info Interpreted relative to prefix

 



























Parameter Configure Option CMake Option CMake Notes
Readline library -- With-readline -DWITH_READLINE = 1
SSL library -- With-ssl =/usr -DWITH_SSL = system
Zlib library -- With-zlib-dir =/usr -DWITH_ZLIB = system
Libwrap library -- Without-libwrap -DWITH_LIBWRAP = 0

 




































































































































Parameter Configure Option CMake Option CMake Notes
TCP/IP port number -- With-tcp-port-= 3306 -DMYSQL_TCP_PORT = 3306
UNIX socket file -- With-unix-socket-path =/tmp/mysqld. sock -DMYSQL_UNIX_ADDR =/tmp/mysqld. sock
Enable LOCAL for LOAD DATA -- Enable-local-infile -DENABLED_LOCAL_INFILE = 1
Extra charsets -- With-extra-charsets = all -DEXTRA_CHARSETS = all Default is "all"
Default charset -- With-charset = utf8 -DDEFAULT_CHARSET = utf8
Default collation -- With-collation = utf8_general_ci -DDEFAULT_COLLATION = utf8_general_ci
Build the server -- With-server None
Build the embedded server -- With-embedded-server -DWITH_EMBEDDED_SERVER = 1
Libmysqld privilege control -- With-embedded-privilege-control None Always enabled?
Install the documentation -- Without-docs None
Big tables -- With-big-tables, -- without-big-tables None Tables are big by default
Mysqld user -- With-mysqld-user = mysql -DMYSQL_USER = mysql Mysql is the default
Debugging -- Without-debug -DWITH_DEBUG = 0 Default is debugging disabled
GIS support -- With-geometry None Always enabled?
Community features -- Enable-community-features None Always enabled
Profiling -- Disable-profiling -DENABLE_PROFILING = 0 Enabled by default
Pstack -- Without-pstack None Pstack is removed
Assembler string functions -- Enable-aggreger None
Build type -- Build = x86_64-pc-linux-gnu No equivalent Unneeded?
Cross-compile host -- Host = x86_64-pc-linux-gnu No equivalent Unneeded?
Client flag -- With-client-ldflags =-lstdc ++ None Unneeded
Client flag -- Enable-thread-safe-client None Unneeded, clients are always thread safe
Comment -- With-comment = 'string' -DWITH_COMMENT = 'string'
Shared/static binaries -- Enable-shared -- enable-static None There is only DISABLE_SHARED
Memory use -- With-low-memory None Unneeded

 

 

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.