In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces what are the CMAKE compilation parameters in Mysql. It is very detailed and has a certain reference value. Friends who are interested must read it!
There are three main ways to install MySQL on Linux platform:
1. Install through RPM package
2. Install directly using compiled binaries
3. Download the source code and install it with custom options.
CMAKE has many parameters when installing with source code. Here are some explanations for some of these parameters.
Commonly used parameters:
●-DCMAKE_INSTALL_PREFIX: it is used to specify the installation path of the software. By default, it is installed to the / usr/local/mysql directory. It doesn't matter if the path is not appropriate after compilation and installation. As long as the MySQL process is not started, you can change the name and storage path of this directory at any time.
●-DDEFAULT_CHARSET: specify the default character set of MySQL service. The default value of this parameter is that there are many character sets that latin1.MySQL can support. For more information, please see the value of SET (CHARSETS_AVAILABLE) variable in cmake/character_sets.cmake file in MySQL source code directory. This option can also be set by character_set_server parameter when MySQL service starts.
●-DDEFAULT_COLLATION: specifies the default proofreading rule for the MySQL service. The default value for this parameter is latin1 swedish_ ci, which can also be set through the collation_ server parameter when the MySQL service starts.
●-DENABLED_LOCAL_INFILE: whether local loading of data from the client to the MySQL server is allowed, specifically for LOAD DATA INFILE statements, is not allowed by default.
●-DENABLED_PROFILING: whether to start query profiling, specifically for SHOW PROFILE and SHOW PROFILES statements, is enabled by default.
●-DMYSQL_DATADIR: specifies the storage path for MySQL database data files, which can be set through the datadir parameter when the MySQL service starts.
●-DSYSCONFDIR: specifies the default path to the MySQL parameter file, which can be set through the defaults-file parameter when the MySQL service starts.
●-DWITH__STORAGE_ENGINE: statically compiles a storage engine. The optional storage engine keywords are ARCHIVE, BLACKHOLE, EXAMPLE, FEDERATED, INNOBASE, PARTITION and PERFSCHEMA. In fact, MySQL supports more than these storage engines, but four storage engines such as MyISAM, MERGE, MEMORY and CSV are compiled to the server by default without specifying. In addition, not all of the keywords listed above are storage engines. For example, PARTITION refers to whether text-holding partitions are allowed, and PERFSCHEMA is the Performance_ schema library.
Such as:
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_ARCHIVE_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
●-DWITHOUT__STORAGE_ENGINE: contrary to the function of the previous parameter, this parameter is used to specify a storage engine that is not compiled. For example, when you do not need to compile the example storage engine, you can specify-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1.
Such as:
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1
-DWITHOUT_FEDERATED_STORAGE_ENGINE=1
-DWITHOUT_PARTITION_STORAGE_ENGINE=1
●-DWITH_EXTRA_CHARSETS: specifies the additional supported character set. The default is all, that is, all.
The parameters that may be used are as follows:
●-DINSTALL_BINDIR: specifies the storage path of MySQL commands, which is in the CMAKE_INSTALL_PREFIX/bin directory by default.
●-DINSTALL_DOCDIR: specifies the storage path for MySQL documents, which defaults to the CMAKE_INSTALL_PREFIX/docs directory.
●-DINSTALL_INCLUDEDIR: specify the storage path of the header file, which is stored in the CMAKE_INSTALL_PREFIX/include directory by default.
●-DINSTALL_LIBDIR: specifies the storage path of the linked file, which is saved in the CMAKE_INSTALL_PREFIX/lib directory by default.
●-DINSTALL_MANDIR: specifies the storage path of the user's manual, which is saved in the CMAKE_INSTALL_PREFIX/man directory by default.
●-DINSTALL_PLUGINDIR: specify the storage path for Plugin, which is stored in the CMAKE_INSTALL_PREFIX/lib/plugin directory by default.
●-DINSTALL_SBINDIR: specifies the storage path where the server executes the script, which is stored in the CMAKE_INSTALL_PREFIX/bin directory by default.
●-DINSTALL_SCRIPTDIR: specify the storage path of the mysql_install_db script that comes with MySQL, which is saved in the CMAKE_INSTALL_PREFIX/scripts directory by default.
●-DINSTALL_SHAREDIR=share points to the aclocal/mysql.m4 installation directory (prefix/share)
●-DINSTALL_INFODIR=share/info points to the info document storage directory (prefix/share/info)
●-DINSTALL_SQLBENCHDIR: specify the storage path for sql-bench, which is stored in the CMAKE_INSTALL_PREFIX directory by default.
●-DINSTALL_SUPPORTFILESDIR: specify the storage path for the additional supporting class files that come with MySQL, which is saved in the CMAKE_INSTALL_PREFIX/support-files directory by default.
●-DMYSQL_TCP_PORT: specifies the TCP/IP port served by the MySQL database, which defaults to 3306. This option can be set through the port parameter when the MySQL service starts.
●-DMYSQL_UNIX_ADDR: specifies the storage path for socket files, which defaults to the / tmp/mysql.sock directory, which can be set through the socket parameter when the MySQL service starts.
●-DWITH_COMMENT: specify compilation information. This parameter is valid for version 5.1 and earlier, but not valid for version 5.5 and later. If you need to specify compilation information, you can use the-DCOMPILATION_COMMENT parameter instead.
●-DWITH_READLINE: specifies how to handle input and output. Versions 5.1 and earlier do not need to be handled separately. Readline is used by default. However, after entering version 5.5, MySQL compiles using libedit to handle input and output by default, which may cause the current environment to log in to mysql command line mode and cannot enter Chinese (only for the current compilation environment, other clients are not affected) Therefore, you need to specify that it is handled in readline mode at compile time.
Tip:
With regard to the-DWITH READLINE parameter, in version 5.6.10, even if-DWITH_READLINE is specified, libedit is still used by default to handle input and output. In this case, even if the installation is successful, no error is reported throughout the process, but you may encounter an "Segmentation fault" error prompt when entering Chinese, resulting in an error termination on the local connection's mysql command line, which is officially defined as BUG. Details can be found in http://bugs.mysql.com/bug.php?id=68231.
●-DWITH_SSL=system enables ssl library support (secure socket layer)
●-DWITH_ZLIB=system enables libz library support (zib, gzib related)
●-DWTIH_LIBWRAP=0 disables the libwrap library (implements a generic TCP wrapper for use by network service daemons)
Embedded server support for ●-DWITH_EMBEDDED_SERVER=1 compilation
●-DMYSQL_USER=mysql specifies the mysql user (default is mysql)
●-DWITH_DEBUG=0 disables debug (default is disabled)
●-DENABLE_PROFILING=0 disables Profiling analysis (default is on)
●-DWITH_COMMENT='string' A descriptive comment on the compilation environment
These are all the contents of the article "what are the CMAKE compilation parameters in Mysql?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.