mysql 5.1 configure 编译参数详解

-static  13%
   --with-client-ldflags=-all-static
   --with-mysqld-ldflags=-all-static
静态链接提高13%性能

Unix Socket  7.5%
--with-unix-socket path=/usr/local/mysql/tmp/mysql.sock

使用unix套接字链接提高7.5%性能,所以在windows下mysql性能肯定不如unix下面

--enable-assembler
The --enable-assembler options of configure allows for
compiling in x86 (and sparc) versions of common string
operations, which should result in more performance.
汇编x86的普通操作符,可以提高性能
--with-extra-charsets =complex字符支持
--enable-thread-safe-client #Compile the client with threads. 也就是让客户端支持线程的意思

--with-big-tables
There is a limit of 2 32 (~4.295E+09) rows in a MyISAM table. If you build MySQL with the --with-big-tables option, the row limitation is increased to (2 32 ) 2 (1.844E+19) rows

--with-ssl
--with-embedded-server    #编译成embedded MySQL library ( libmysqld.a ),
--enable-local-infile #让mysql支持从本地文件 导入数据库
load data local infile '/usr/test' into table test fields terminated by ' ';
ERROR 1148 (42000): The used command is not allowed with this MySQL version)

--with-plugins=innobase 存储引擎
Mysql5.1开始,编译添加innodb插件就从--with-innodb 改成了 --with-plugins=innobase

--with-plugins=PLUGIN[[[,PLUGIN..]]]
                                                    Plugins to include in mysqld. ( default is : none)
                                                    Must be a configuration name or a comma separated
                                                    list of plugins.
                                                    Available configurations are: none max max-no-ndb
                                                    all.
                                                    Available plugins are: partition daemon_example
                                                    ftexample archive blackhole csv example federated
                                                    heap innobase myisam myisammrg ndbcluster
如果多个插件,可以写成:--with-plugins=partition,blackhole,heap,innobase,myisam,ndbcluster 用逗号分开

 

实例:./configure –prefix=/usr/local/webserver/mysql/ --enable-assembler --with-unix-socket-path=/tmp/mysql.sock --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static  --with-extra-charsets=gbk,gb2312,utf8 --enable-thread-safe-client --with-big-tables --enable-local-infile --with-ssl

make && make install

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值