MySQL cmake Parameter Description manual

Source: Internet
Author: User
Tags comparison table

MySQL has started using the CMake compilation tool since version 5.5, so it is normal that you cannot find the Configure file in the installation source file. A lot of people down to the new version of MySQL, because can't find the Configure file, do not know how to go on. Is there an article for reference? In fact, there is an article on the http://forge.mysql.com website, which specifically describes how to use the CMake tool to build a new version of MySQL installation.

The original address is: Http://forge.mysql.com/wiki/Autotools_to_CMake_Transition_Guide.

1. Introduction
2. Command invocation syntax
3. Installation parameter options
4. Storage Engine Options
5. library file Loading options
6. Other options Introduction

This page describes some of the configuration options for common compilation tools and how these configuration options are configured in CMake, and then describes how to use the CMake tool to build and compile MySQL.

command Invocation Syntax

The following table lists the calling syntax and the equivalent CMake command for the common compilation tools. “.” Indicates your current working directory path, please replace the path "." According to your directory.

Configure command CMake command
./configure CMake.
./configure--help CMake. -lh or Ccmake.

Before reconfiguring or rebuilding, you need to clear the old object file and cache information as follows:

Autotools:

                           View plain                       copy                            
 
   
  
  1. Make clean
  2. RM Config.cache

CMake (Unix/linux):

                           View plain                       copy                            
 
   
  
  1. Make clean
  2. RM CMakeCache.txt

CMake (Windows):

                           View plain                       copy                            
 
   
  
  1. Devenv Mysql.sln/clean
  2. Del CMakeCache.txt
Installation parameter Options

In the following table, the value of "Cmake_install_prefix" represents the installation root, the path to the other parameter values is relative to the root directory, and of course you can use the absolute path directly, as follows:

Parameter Value Description Configuration options CMAK options
Install the root directory --prefix=/usr -dcmake_install_prefix=/usr
Mysqld Directory --libexecdir=/usr/sbin -dinstall_sbindir=sbin
Data store Directory --localstatedir=/var/lib/mysql -dmysql_datadir=/var/lib/mysql
Configuration files (my.cnf) directory --sysconfdir=/etc/mysql -dsysconfdir=/etc/mysql
Plugin Directory --with-plugindir=/usr/lib64/mysql/plugin -dinstall_plugindir=lib64/mysql/plugin
Manual file Directory --mandir=/usr/share/man -dinstall_mandir=share/man
Shared Data Directory --sharedstatedir=/usr/share/mysql -dinstall_sharedir=share
Library Directory --libdir=/usr/lib64/mysql -dinstall_libdir=lib64/mysql
Header installation directory --includedir=/usr/include/mysql -dinstall_includedir=include/mysql
Directory of Information documents --infodir=/usr/share/info -dinstall_infodir=share/info
Storage Engine Options

The storage engine exists as a plug-in, so this option can control the build of the plug-in, such as specifying the use of a particular engine.

The--with-plugins configuration option accepts two forms of parameter values, which do not have a corresponding CMake configuration parameter:

① List of engine names separated by commas (,);

②a "group name" value that's shorthand for a set of engines

In CMake, the engine is controlled as a single option. Suppose you have the following configuration options:

                           View plain                       copy                            
 
   
  
  1. --with-plugins = CSV , Myisam,myisammrg,heap,innobase,archive,blackhole

The above parameters specify which database engines can be supported by the MySQL database, and the following engine names can be omitted when the compile option is converted to the CMake compilation option, because the default is supported at compile time:

                           View plain                       copy                            
 
   
  
  1. CSV MyISAM MYISAMMRG Heap

Then use the following compilation parameters to enable InnoDB, archive, and Blackhole engine support:

View PlainCopy                            
  
 
    1. -dwith_innobase_storage_engine=1
    2. -dwith_archive_storage_engine=1
    3. -dwith_blackhole_storage_engine=1

You can also use "on" instead of the number 1, which is equivalent.

If you want to remove support for some kind of engine, use-dwithout_<engine>_storage_engine in the cmake compilation option, for example:

View PlainCopy                            
  
 
    1. -dwithout_example_storage_engine=1
    2. -dwithout_federated_storage_engine=1
    3. -dwithout_partition_storage_engine=1
library file Load Options

This option indicates the situation where MySQL uses the library:

Parameter Value Description Configuration options CMAK options
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
Other Options

The cmake compilation option supports most of the previous versions of MySQL compilation options, the difference between the old and the new compilation options is that the previous lowercase, now all capitalized, preceded by a double horizontal line, now using a single horizontal line, the previous dash used, now instead of using underscores, for example:

View PlainCopy                            
  
 
    1. --with-debug => with_debug=1
    2. --with-embedded-server => with_embedded_server

The following is the compilation of MySQL new and old parameter comparison table:

Parameter Value Description Configuration options CMAK options
TCP/IP Port --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 loading of local data --enable-local-infile -denabled_local_infile=1
Extended character support --with-extra-charsets=all (default: All) -dextra_charsets=all (default: All)
Default Character Set --with-charset=utf8 -ddefault_charset=utf8
Default character Proofing --with-collation=utf8_general_ci -ddefault_collation=utf8_general_ci
Build the server --with-server No
Embedded server --with-embedded-server -dwith_embedded_server=1
Libmysqld Permissions Control --with-embedded-privilege-control No
Installation documentation --without-docs No
Big Tables Support --with-big-tables,--without-big-tables No
Mysqld Running Users --with-mysqld-user=mysql -dmysql_user=mysql
Debug mode --without-debug (disabled by default) -dwith_debug=0 (disabled by default)
GIS support --with-geometry No
Community Features --enable-community-features No
Profiling --disable-profiling (enabled by default) -denable_profiling=0 (enabled by default)
Pstack --without-pstack None (new version removes this feature)
Assembly String Functions --enable-assembler No
Build Type --build=x86_64-pc-linux-gnu No equivalent parameters
Cross-compiling hosts --host=x86_64-pc-linux-gnu No equivalent parameters
Client Flag --with-client-ldflags=-lstdc++ No
Thread Safety Flags --enable-thread-safe-client No
Note Storage type --with-comment= ' String ' -dwith_comment= ' String '
Shared/static binaries --enable-shared--enable-static No
Memory usage Control --with-low-memory No

MySQL cmake Parameter Description manual

Related Article

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.