MySQL Server Version Reference  /  Build (Configuration) Options

Chapter 4 Build (Configuration) Options

The following tables details all of the configuration options available when building MySQL server from source. The first table shows the CMake options, which are used in MySQL 5.5.5 and up. The second table shows the configure (GNU autotools) options, which are used prior to MySQL 5.5.5. The tables includes the following columns:

  • Formats: The command line format for the configure option.

  • Description: A short description of the option.

  • Default: The default value.

  • Introduced: The versions in which the option was introduced.

  • Removed: The versions in which the option was removed.

  • 5.1, 5.5, and so forth: Whether the option is available in MySQL 5.1, MySQL 5.5, and so forth. If available, a link to the reference manual where more information can be located will be included.

Table 4.1 Build (CMake) options

Name Description
Default Introduced Removed 5.5 5.6 5.7
BUILD_CONFIG Use same build options as official releases
  5.5.7   Yes Yes Yes
CMAKE_BUILD_TYPE Type of build to produce
RelWithDebInfo 5.5.7   Yes Yes Yes
CMAKE_CXX_FLAGS Flags for C++ Compiler
      Yes Yes Yes
CMAKE_C_FLAGS Flags for C Compiler
      Yes Yes Yes
CMAKE_INSTALL_PREFIX Installation base directory
/usr/local/mysql 5.5.8   Yes Yes Yes
COMPILATION_COMMENT Comment about compilation environment
  5.5.7   Yes Yes Yes
CPACK_MONOLITHIC_INSTALL Whether package build produces single file
OFF 5.5.7   Yes Yes Yes
DEFAULT_CHARSET The default server character set
latin1 5.5.7   Yes Yes Yes
DEFAULT_COLLATION The default server collation
latin1_swedish_ci 5.5.7   Yes Yes Yes
DISABLE_PSI_COND Exclude Performance Schema condition instrumentation
OFF 5.7.3       Yes
DISABLE_PSI_FILE Exclude Performance Schema file instrumentation
OFF 5.7.3       Yes
DISABLE_PSI_IDLE Exclude Performance Schema idle instrumentation
OFF 5.7.3       Yes
DISABLE_PSI_MEMORY Exclude Performance Schema memory instrumentation
OFF 5.7.3       Yes
DISABLE_PSI_METADATA Exclude Performance Schema metadata instrumentation
OFF 5.7.3       Yes
DISABLE_PSI_MUTEX Exclude Performance Schema mutex instrumentation
OFF 5.7.3       Yes
DISABLE_PSI_RWLOCK Exclude Performance Schema rwlock instrumentation
OFF 5.7.3       Yes
DISABLE_PSI_SOCKET Exclude Performance Schema socket instrumentation
OFF 5.7.3       Yes
DISABLE_PSI_SP Exclude Performance Schema stored program instrumentation
OFF 5.7.3       Yes
DISABLE_PSI_STAGE Exclude Performance Schema stage instrumentation
OFF 5.7.3       Yes
DISABLE_PSI_STATEMENT Exclude Performance Schema statement instrumentation
OFF 5.7.3       Yes
DISABLE_PSI_STATEMENT_DIGEST Exclude Performance Schema statement_digest instrumentation
OFF 5.7.3       Yes
DISABLE_PSI_TABLE Exclude Performance Schema table instrumentation
OFF 5.7.3       Yes
DOWNLOAD_BOOST Whether to download the Boost library
OFF 5.7.5       Yes
DOWNLOAD_BOOST_TIMEOUT Timeout in seconds for downloading the Boost library
600 5.7.6       Yes
-DWITH_PROTOBUF Which Protocol Buffers package to use
bundled 5.7.12       Yes
-DWITH_SYMVER16 Whether libmysqlclient.so.18 contains both symver 16 and 18 symbols.
OFF 5.6.31     Yes  
ENABLED_LOCAL_INFILE Whether to enable LOCAL for LOAD DATA INFILE
OFF 5.5.7   Yes Yes Yes
ENABLED_PROFILING Whether to enable query profiling code
ON 5.5.7   Yes Yes Yes
ENABLE_DEBUG_SYNC Whether to enable Debug Sync support
ON 5.5.7   Yes Yes Yes
ENABLE_DOWNLOADS Whether to download optional files
OFF 5.5.7   Yes Yes Yes
ENABLE_DTRACE Whether to include DTrace support
  5.5.7   Yes Yes Yes
ENABLE_GCOV Whether to include gcov support
  5.5.14, 5.6.3   Yes Yes Yes
ENABLE_GPROF Enable gprof (optimized Linux builds only)
OFF 5.6.6     Yes Yes
FORCE_UNSUPPORTED_COMPILER Whether to permit unsupported compiler
OFF 5.7.5       Yes
IGNORE_AIO_CHECK With -DBUILD_CONFIG=mysql_release, ignore libaio check
OFF 5.5.9, 5.6.1   Yes Yes Yes
INNODB_PAGE_ATOMIC_REF_COUNT Enable or disable atomic page reference counting
ON 5.6.16, 5.7.4 5.7.5   Yes Yes
INSTALL_BINDIR User executables directory
PREFIX/bin 5.5.7   Yes Yes Yes
INSTALL_DOCDIR Documentation directory
PREFIX/docs 5.5.7   Yes Yes Yes
INSTALL_DOCREADMEDIR README file directory
PREFIX 5.5.7   Yes Yes Yes
INSTALL_INCLUDEDIR Header file directory
PREFIX/include 5.5.7   Yes Yes Yes
INSTALL_INFODIR Info file directory
PREFIX/docs 5.5.7   Yes Yes Yes
INSTALL_LAYOUT Select predefined installation layout
STANDALONE 5.5.7   Yes Yes Yes
INSTALL_LIBDIR Library file directory
PREFIX/lib 5.5.7   Yes Yes Yes
INSTALL_MANDIR Manual page directory
PREFIX/man 5.5.7   Yes Yes Yes
INSTALL_MYSQLKEYRINGDIR Directory for keyring_file plugin data file
platform specific 5.7.11       Yes
INSTALL_MYSQLSHAREDIR Shared data directory
PREFIX/share 5.5.7   Yes Yes Yes
INSTALL_MYSQLTESTDIR mysql-test directory
PREFIX/mysql-test 5.5.7   Yes Yes Yes
INSTALL_PKGCONFIGDIR Directory for mysqlclient.pc pkg-config file
INSTALL_LIBDIR/pkgconfig 5.7.9       Yes
INSTALL_PLUGINDIR Plugin directory
PREFIX/lib/plugin 5.5.7   Yes Yes Yes
INSTALL_SBINDIR Server executable directory
PREFIX/bin 5.5.7   Yes Yes Yes
INSTALL_SCRIPTDIR Scripts directory
PREFIX/scripts 5.5.7   Yes Yes Yes
INSTALL_SECURE_FILE_PRIVDIR secure_file_priv default value
platform specific 5.7.6       Yes
INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR secure_file_priv default value for libmysqld
  5.7.8       Yes
INSTALL_SHAREDIR aclocal/mysql.m4 installation directory
PREFIX/share 5.5.7   Yes Yes Yes
INSTALL_SQLBENCHDIR sql-bench directory
PREFIX 5.5.7 5.7.8 Yes Yes Yes
INSTALL_SUPPORTFILESDIR Extra support files directory
PREFIX/support-files 5.5.7   Yes Yes Yes
MAX_INDEXES Maximum indexes per table
64 5.7.1       Yes
MEMCACHED_HOME Path to memcached
[none] 5.5.16-ndb-7.2.2   Yes Yes  
MUTEX_TYPE InnoDB mutex type
event 5.7.2       Yes
MYSQL_DATADIR Data directory
  5.5.7   Yes Yes Yes
MYSQL_MAINTAINER_MODE Whether to enable MySQL maintainer-specific development environment
OFF 5.5.7   Yes Yes Yes
MYSQL_PROJECT_NAME Windows/OS X project name
3306 5.5.21, 5.6.5   Yes Yes Yes
MYSQL_TCP_PORT TCP/IP port number
3306 5.5.7   Yes Yes Yes
MYSQL_UNIX_ADDR Unix socket file
/tmp/mysql.sock 5.5.7   Yes Yes Yes
ODBC_INCLUDES ODBC includes directory
      Yes Yes Yes
ODBC_LIB_DIR ODBC library directory
      Yes Yes Yes
OPTIMIZER_TRACE Whether to support optimizer tracing
  5.6.3     Yes Yes
SUNPRO_CXX_LIBRARY Client link library on Solaris 10+
  5.6.20, 5.7.5     Yes Yes
SYSCONFDIR Option file directory
  5.5.7   Yes Yes Yes
SYSTEMD_PID_DIR Directory for PID file under systemd
/var/run/mysqld 5.7.6       Yes
SYSTEMD_SERVICE_NAME Name of MySQL service under systemd
mysqld 5.7.6       Yes
TMPDIR tmpdir default value
  5.5.36, 5.6.16, 5.7.4   Yes Yes Yes
WIN_DEBUG_NO_INLINE Whether to disable function inlining
OFF 5.7.6       Yes
WITHOUT_SERVER Do not build the server
OFF     Yes Yes Yes
WITHOUT_xxx_STORAGE_ENGINE Exclude storage engine xxx from build
  5.5.7   Yes Yes Yes
WITH_ASAN Enable AddressSanitizer
OFF 5.5.35, 5.6.15, 5.7.3   Yes Yes Yes
WITH_AUTHENTICATION_PAM Build PAM authentication plugin
OFF         Yes
WITH_BOOST The location of the Boost library sources
  5.7.5       Yes
WITH_BUNDLED_LIBEVENT Use bundled libevent when building ndbmemcache
ON 5.5.16-ndb-7.2.2   Yes Yes  
WITH_BUNDLED_MEMCACHED Use bundled memcached when building ndbmemcache
ON 5.5.16-ndb-7.2.2   Yes Yes  
WITH_CLASSPATH Classpath to use when building MySQL Cluster Connector for Java. Default is an empty string.
    Yes Yes  
WITH_CLIENT_PROTOCOL_TRACING Build client-side protocol tracing framework
ON 5.7.2       Yes
WITH_DEBUG Whether to include debugging support
OFF 5.5.7   Yes Yes Yes
WITH_DEFAULT_COMPILER_OPTIONS Whether to use default compiler options
ON 5.6.6     Yes Yes
WITH_DEFAULT_FEATURE_SET Whether to use default feature set
ON 5.6.6     Yes Yes
WITH_EDITLINE Which libedit/editline library to use
bundled 5.6.12, 5.7.2     Yes Yes
WITH_EMBEDDED_SERVER Whether to build embedded server
OFF 5.5.7   Yes Yes Yes
WITH_EMBEDDED_SHARED_LIBRARY Whether to build a shared embedded server library
OFF 5.5.37, 5.6.17, 5.7.4   Yes Yes Yes
WITH_ERROR_INSERT Enable error injection in the NDB storage engine. Should not be used for building binaries intended for production.
OFF     Yes Yes  
WITH_EXTRA_CHARSETS Which extra character sets to include
all 5.5.7   Yes Yes Yes
WITH_INNODB_EXTRA_DEBUG Whether to include extra debugging support for InnoDB.
OFF 5.7.2       Yes
WITH_INNODB_MEMCACHED Whether to generate memcached shared libraries.
OFF       Yes Yes
WITH_KEYRING_TEST Build the keyring test program
OFF 5.7.11       Yes
WITH_LIBEDIT Use bundled libedit library
ON 5.5.7 5.6.12 Yes Yes  
WITH_LIBEVENT Which libevent library to use
bundled 5.6.6     Yes Yes
WITH_LIBWRAP Whether to include libwrap (TCP wrappers) support
OFF 5.5.7   Yes Yes Yes
WITH_MECAB Compiles MeCab
  5.7.6       Yes
WITH_MSAN Enable MemorySanitizer
OFF 5.7.4       Yes
WITH_MSCRT_DEBUG Enable Visual Studio CRT memory leak tracing
OFF 5.7.6       Yes
WITH_NDBCLUSTER Build the NDB storage engine; alias for WITH_NDBCLUSTER_STORAGE_ENGINE
ON     Yes Yes Yes
WITH_NDBCLUSTER_STORAGE_ENGINE Build the NDB storage engine
ON     Yes Yes Yes
WITH_NDBMTD Build multi-threaded data node.
ON     Yes Yes  
WITH_NDB_BINLOG Enable binary logging by default by mysqld.
ON     Yes Yes  
WITH_NDB_DEBUG Produce a debug build for testing or troubleshooting.
OFF     Yes Yes  
WITH_NDB_JAVA Enable building of Java and ClusterJ support. Enabled by default. Supported in MySQL Cluster only.
ON 5.5.27-ndb-7.2.9   Yes Yes  
WITH_NDB_PORT Default port used by a management server built with this option. If this option was not used to build it, the management server's default port is 1186.
[none]     Yes Yes  
WITH_NDB_TEST Include NDB API test programs.
OFF     Yes Yes  
WITH_RAPID Whether to build rapid development cycle plugins
ON 5.7.12       Yes
WITH_READLINE Use bundled readline library
OFF 5.5.7 5.6.5 Yes Yes  
WITH_SSL Type of SSL support
bundled 5.5.7   Yes Yes Yes
WITH_SYSTEMD Enable installation of systemd support files
OFF 5.7.6       Yes
WITH_TEST_TRACE_PLUGIN Build test protocol trace plugin
OFF 5.7.2       Yes
WITH_UBSAN Enable Undefined Behavior Sanitizer
OFF 5.7.6       Yes
WITH_UNIXODBC Enable unixODBC support
OFF     Yes Yes Yes
WITH_VALGRIND Whether to compile in Valgrind header files
OFF 5.5.6   Yes Yes Yes
WITH_ZLIB Type of zlib support
bundled 5.5.7   Yes Yes Yes
WITH_xxx_STORAGE_ENGINE Compile storage engine xxx statically into server
  5.5.7   Yes Yes Yes

Table 4.2 Build (configure) options

Name Description
Default Introduced Removed 5.1
--bindir User executables
EPREFIX/bin     Yes
--build Configure for building on BUILD
guessed     Yes
--cache-file Cache test results in FILE
disabled     Yes
--config-cache Alias for `--cache-file=config.cache'
      Yes
--datadir Read-only architecture-independent data
PREFIX/share     Yes
--disable-FEATURE Do not include FEATURE
      Yes
--disable-community-features Disable additional features provided by the community
  5.1.28   Yes
--disable-dependency-tracking Disable dependency tracking
      Yes
--disable-grant-options Disable GRANT options
      Yes
--disable-largefile Omit support for large files
      Yes
--disable-libtool-lock Disable libtool lock
      Yes
--disable-thread-safe-client Compile the client without threads
  5.1.7   Yes
--enable-FEATURE Enable FEATURE
      Yes
--enable-assembler Use assembler versions of some string functions if available
      Yes
--enable-debug-sync Compile in Debug Sync facility
  5.1.41   Yes
--enable-dependency-tracking Do not reject slow dependency extractors
      Yes
--enable-fast-install Optimize for fast installation
yes     Yes
--enable-local-infile Enable LOCAL for LOAD DATA INFILE
disabled     Yes
--enable-profiling Build a version with query profiling code
  5.1.24   Yes
--enable-shared Build shared libraries
yes     Yes
--enable-static Build static libraries
yes     Yes
--enable-thread-safe-client Compile the client with threads
    5.1.6 Yes
--exec-prefix Install architecture-dependent files in EPREFIX
      Yes
--help Display help message and exit
      Yes
--host Cross-compile to build programs to run on HOST
      Yes
--includedir C header files
PREFIX/include     Yes
--infodir Info documentation
PREFIX/info     Yes
--libdir Object code libraries
EPREFIX/lib     Yes
--libexecdir Program executables
EPREFIX/libexec     Yes
--localstatedir Modifiable single-machine data
PREFIX/var     Yes
--mandir man documentation
PREFIX/man     Yes
--no-create Do not create output files
      Yes
--oldincludedir C header files for non-gcc
/usr/include     Yes
--prefix Install architecture-independent files in PREFIX
      Yes
--program-prefix Prepend PREFIX to installed program names
      Yes
--program-suffix Append SUFFIX to installed program names
      Yes
--program-transform-name run sed PROGRAM on installed program names
      Yes
--quiet Do not print `checking...' messages
      Yes
--sbindir System administrative executables
EPREFIX/sbin     Yes
--sharedstatedir Modifiable architecture-independent data
PREFIX/com     Yes
--srcdir Find the sources in DIR
configure directory or ..     Yes
--sysconfdir Read-only single-machine data
PREFIX/etc     Yes
--target Configure for building compilers for TARGET
      Yes
--version Display version information and exit
      Yes
--with-PACKAGE Use PACKAGE
      Yes
--with-archive-storage-engine Enable the Archive Storage Engine
no   5.1.9 Yes
--with-atomic-ops Implement atomic operations using pthread rwlocks or atomic CPU instructions for multi-processor
  5.1.12   Yes
--with-berkeley-db Use BerkeleyDB located in DIR
no   5.1.11 Yes
--with-berkeley-db-includes Find Berkeley DB headers in DIR
    5.1.11 Yes
--with-berkeley-db-libs Find Berkeley DB libraries in DIR
    5.1.11 Yes
--with-big-tables Support tables with more than 4 G rows even on 32 bit platforms
      Yes
--with-blackhole-storage-engine Enable the Blackhole Storage Engine
no   5.1.9 Yes
--with-charset Default character set
      Yes
--with-client-ldflags Extra linking arguments for clients
      Yes
--with-collation Default collation
      Yes
--with-comment Comment about compilation environment
      Yes
--with-csv-storage-engine Enable the CSV Storage Engine
yes   5.1.9 Yes
--with-darwin-mwcc Use Metrowerks CodeWarrior wrappers on OS X/Darwin
      Yes
--with-debug Add debug code (optionally with memory checker, very slow)
  5.1.7   Yes
--with-embedded-privilege-control Build parts to check user's privileges (only affects embedded library)
      Yes
--with-embedded-server Build the embedded server
      Yes
--with-error-inject Enable error injection in MySQL Server
  5.1.11   Yes
--with-example-storage-engine Enable the Example Storage Engine
no   5.1.9 Yes
--with-extra-charsets Use charsets in addition to default
      Yes
--with-fast-mutexes Compile with fast mutexes
disabled 5.1.5   Yes
--with-federated-storage-engine Enable federated storage engine
no 5.1.3 5.1.9 Yes
--with-gnu-ld Assume the C compiler uses GNU ld
no     Yes
--with-innodb Enable innobase storage engine
no 5.1.3 5.1.9 Yes
--with-lib-ccflags Extra CC options for libraries
      Yes
--with-libwrap Compile in libwrap (tcp_wrappers) support
      Yes
--with-low-memory Try to use less memory to compile to avoid memory limitations
      Yes
--with-machine-type Set the machine type, like "powerpc"
      Yes
--with-maria-temp-tables Make the temporary tables within MySQL use the Maria storage engine
  5.1.24   Yes
--with-max-indexes Sets the maximum number of indexes per table
64     Yes
--with-mysqld-ldflags Extra linking arguments for mysqld
      Yes
--with-mysqld-libs Extra libraries to link with for mysqld
      Yes
--with-mysqld-user What user the mysqld daemon shall be run as
      Yes
--with-mysqlmanager Build the mysqlmanager binary
Build if server is built     Yes
--with-named-curses-libs Use specified curses libraries
      Yes
--with-named-thread-libs Use specified thread libraries
      Yes
--with-ndb-ccflags Extra CC options for ndb compile
      Yes
--with-ndb-docs Include the NDB Cluster ndbapi and mgmapi documentation
      Yes
--with-ndb-port Port for NDB Cluster management server
      Yes
--with-ndb-port-base Port for NDB Cluster management server
      Yes
--with-ndb-sci Provide MySQL with a custom location of sci library
      Yes
--with-ndb-test Include the NDB Cluster ndbapi test programs
      Yes
--with-ndbcluster Include the NDB Cluster table handler
no   5.1.9 Yes
--with-openssl Include the OpenSSL support
    5.1.9 Yes
--with-openssl-includes Find OpenSSL headers in DIR
    5.1.9 Yes
--with-openssl-libs Find OpenSSL libraries in DIR
    5.1.9 Yes
--with-other-libc Link against libc and other standard libraries installed in the specified nonstandard location
      Yes
--with-pic Try to use only PIC/non-PIC objects
Use both     Yes
--with-plugin-PLUGIN Forces the named plugin to be linked into mysqld statically
  5.1.11   Yes
--with-plugins Plugins to include in mysqld
none 5.1.11   Yes
--with-pstack Use the pstack backtrace library
    5.1.54 Yes
--with-pthread Force use of pthread library
      Yes
--with-row-based-replication Include row-based replication
  5.1.5 5.1.6 Yes
--with-server-suffix Append value to the version string
      Yes
--with-ssl Include SSL support
  5.1.11   Yes
--with-system-type Set the system type, like "sun-solaris10"
      Yes
--with-tags Include additional configurations
automatic     Yes
--with-tcp-port Which port to use for MySQL services
3306     Yes
--with-unix-socket-path Where to put the unix-domain socket
      Yes
--with-yassl Include the yaSSL support
    5.1.9 Yes
--with-zlib-dir Provide MySQL with a custom location of compression library
      Yes
--without-PACKAGE Do not use PACKAGE
      Yes
--without-bench Skip building of the benchmark suite
    5.1.11 Yes
--without-debug Build a production version without debugging code
    5.1.6 Yes
--without-docs Skip building of the documentation
      Yes
--without-extra-tools Skip building utilities in the tools directory
    5.1.9 Yes
--without-geometry Do not build geometry-related parts
      Yes
--without-libedit Use system libedit instead of bundled copy
      Yes
--without-man Skip building of the man pages
      Yes
--without-ndb-binlog Disable ndb binlog
  5.1.6   Yes
--without-ndb-debug Disable special ndb debug features
      Yes
--without-plugin-PLUGIN Exclude PLUGIN
  5.1.11   Yes
--without-query-cache Do not build query cache
      Yes
--without-readline Use system readline instead of bundled copy
      Yes
--without-row-based-replication Don't include row-based replication
  5.1.7 5.1.14 Yes
--without-server Only build the client
      Yes
--without-uca Skip building of the national Unicode collations
      Yes


PREV   HOME   UP