mysql源代码安装细说(二)

2015-01-25 19:47:03 · 作者: · 浏览: 15
ng Connector/ODBC.
?
-DSYSCONFDIR=dir_name
The default my.cnf option file directory. This location cannot be set at server startup, but you can start the server with a given option file using the --defaults-file=file_name option, where file_name is the full path name to the file.

在编译mysql时,我们可以指定如何将存储引擎编译进mysql:静态编译和动态编译。个人认为静态编译的服务器效率会高一些。

默认情况下MyISAM, MERGE, MEMORY, CSV 四种存储引擎是必须的,并且会静态编译进服务器中。如果我们需要静态编译其他存储引擎可以使用如下参数

-DWITH_engine_STORAGE_ENGINE=1

这里的engine可以取值ARCHIVE, BLACKHOLE, EXAMPLE, FEDERATED, INNOBASE,NDB or NDBCLUSTER (NDB), PARTITION (partitioning support), and PERFSCHEMA(Performance Schema).

我们也可以显示排除某种存储引擎,如

-DWITHOUT_engine_STORAGE_ENGINE=1.

如果对于某种引擎即没有显示引入也没有显示排除,mysql会将该引擎编译成共享模块,如果无法编译成共享模块,则排除该引擎。

-DDEFAULT_CHARSET=charset_name

指定数据库的默认字符集,字符集的取值可以在cmake/charset-sets.cmake下找到

-DDEFAULT_COLLATION=collation_name

指定数据库的排序方式,可以在数据库启动时通过--collation_server选项来指定,通过show collation命令可以查看可选的排序方式

-DENABLE_DEBUG_SYNC=bool

用于开启mysql的同步调试功能,默认情况下,该功能是开启的,但是只有在mysql配置为启用调试时才会生效。既是启用了该功能,在运行时该功能亦是关闭的,需要使用--debug-sync-timeout=N 选项来启动mysql服务器才可以,默认n为0,即该功能禁用,如果n大于0,在同步调试会等待n时间单位,否则会超时。

?
-DENABLE_DOWNLOADS=bool
用来下载一些可选文件,如google的测试分支等。

-DENABLE_DTRACE=bool
是否启用dtrace
?
-DENABLE_GCOV=bool
Whether to include gcov support (Linux only).
?
-DENABLE_GPROF=bool
Whether to enable gprof (optimized Linux builds only). This option was added in MySQL 5.6.6.
?
-DENABLED_LOCAL_INFILE=bool
使mysql客户端具有load data infile的功能,该功能具有安全隐患,

?
-DENABLED_PROFILING=bool
是否启用PROFILING功能,建议开启,用于性能监视


?
-DIGNORE_AIO_CHECK=bool
If the -DBUILD_CONFIG=mysql_release option is given on Linux, the libaio library must be
linked in by default. If you do not have libaio or do not want to install it, you can suppress the
check for it by specifying -DIGNORE_AIO_CHECK=1. This option was added in MySQL 5.6.1.
?
-DINNODB_PAGE_ATOMIC_REF_COUNT=bool
Whether to enable or disable atomic page reference counting. Fetching and releasing pages from the buffer pool and tracking the page state are expensive and complex operations. Using a page
mutex to track these operations does not scale well. With INNODB_PAGE_ATOMIC_REF_COUNT=ON (default), fetch and release is tracked using atomics where available. For platforms that do not
support atomics, set INNODB_PAGE_ATOMIC_REF_COUNT=OFF to disable atomic page reference counting.
When atomic page reference counting is enabled (default), “[Note] InnoDB: Using atomics
to ref count buffer pool pages” is printed to the error log at server startup. If atomic page reference counting is disabled, “[Note] InnoDB: Using mutexes to ref count buffer pool pages” is printed instead.
This build option was introduced with the fix for MySQL Bug #68079.
?
-DMYSQL_MAINTAINER_MODE=bool
Whether to enable a MySQL maintainer-specific development environment. If enabled, this option causes compiler warnings to become errors.
?
-DMYSQL_TCP_PORT=port_num
The port number on on which the server listens for TCP/IP connections. The default is 3306. This value can be set at server startup with the --port option.


-DMYSQL_UNIX_ADDR=file_name
The Unix socket file path on which the server listens for socket connections. This must be an absolute path name. The default is /tmp/mysql.sock.
This value can be set at server startup with the --socket option.

?
-DOPTIMIZER_TRACE=bool
Whether to support optimizer tracing. See MySQL Internals: Tracing the Optimizer. This