MySQL的configure参数详解

其中常用的有以下这些,需要记住的:
--prefix=PATH:指定程序安装路径;
--datadir=/data/mysqldata  指定mysql数据库的数据存放位置
--with-innodb 安装引擎是innodb
--with-charset=CHARSET:指定字符集;
--with-ssl:启用SSL的支持;
--with-mysqld-user=:指定mysqld守护进程的用户;
--with-mysqld-ldflags=:静态编译MySQL服务器端;(静态链接提高13%性能)
--with-client-ldflags=:静态编译MySQL客户端;(静态链接提高13%性能)

详解:
--prefix=PATH:指定程序安装路径;
--enable-assembler:使用汇编模式;(文档说明:compiling in x86 (and sparc) versions of common string operations, which should result in more performance.  汇编x86的普通操作符,可以提高性能)
--enable-local-infile:启用对LOAD DATA LOCAL INFILE语法的支持(默认不支持);
--enable-profilingBuild a version with query profiling code (req.community-features)
--enable-thread-safe-client:使用编译客户端;(让客户端支持线程的意思)
--with-big-tables:启用32位平台对4G大表的支持;
--with-charset=CHARSET:指定字符集;
--with-collation=:默认collation
--with-extra-charsets=CHARSET,CHARSET,...:指定附加的字符集;
--with-fast-mutexesCompile with fast mutexes
--with-readline
--with-ssl:启用SSL的支持;
--with-server-suffix=:添加字符串到版本信息;
--with-embedded-server:编译embedded-server,构建嵌入式MySQL库;
--with-pthread:强制使用pthread类库;
--with-mysqld-user=:指定mysqld守护进程的用户;
--with-mysqld-ldflags=:静态编译MySQL服务器端;(静态链接提高13%性能)
--with-client-ldflags=:静态编译MySQL客户端;(静态链接提高13%性能)
--with-plugins=PLUGIN,PLUGIN 等等等(MySQL服务器端支持的存储引擎组件(默认为空),可选值较多:
partitionMySQL Partitioning Support
daemon_exampleThis is an example plugin daemon
ftexampleSimple full-text parser plugin
archiveArchive Storage Engine
blackholeBasic Write-only Read-never tables
csvStores tables in text CSV format,强制安装;
exampleExample for Storage Engines for developers
federatedConnects to tables on remote MySQL servers
heapVolatile memory based tables,强制安装;
ibmdb2iIBM DB2 for i Storage Engine
innobaseTransactional Tables using InnoDB
innodb_pluginTransactional Tables using InnoDB
myisamTraditional non-transactional MySQL tables,强制安装;
myisammrgMerge multiple MySQL tables into one,强制安装;
ndbclusterHigh Availability Clustered tables;) 

--with-plugin-PLUGIN:强制指定的插件链接至MySQL服务器;
--with-zlib-dir=:向MySQL提供一个自定义的压缩类库地址;
--without-server:仅安装MySQL客户端;
--without-query-cache:不要编译查询缓存;
--without-geometry:不要编译geometry-related部分;
--without-debug:编译为产品版,放弃debugging代码;
--without-ndb-debug:禁用special ndb debug特性;

基于以上,我的配置:
./configure --prefix=/usr/local/mysql/ \
--datadir=/data/mysqldata \
--with-innodb \
--enable-assembler \ 
--enable-local-infile \ 
--enable-thread-safe-client \
--with-big-tables \
--with-charset=utf8  \
--with-extra-charsets=gbk,gb2312,utf8,ascii  \
--with-ssl \
--with-embedded-server \
--with-pthread \
--with-mysqld-user=mysql \
--with-mysqld-ldflags=-all-static \
--with-client-ldflags=-all-static \
--with-plugins=partition,innobase,innodb_plugin 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值