Chinaunix首页 | 论坛 | 博客
  • 博客访问: 477693
  • 博文数量: 99
  • 博客积分: 3621
  • 博客等级: 中校
  • 技术积分: 1089
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-22 16:29
文章存档

2012年(21)

2011年(28)

2010年(50)

分类: Mysql/postgreSQL

2012-01-19 13:45:53

Mysql 常用编译参数注解

  1. --enable-assembler                  #允许使用汇编模式(使用一些字符函数的汇编版本),可以提高性能   
  2. --enable-thread-safe-client             #客户端线程安全   
  3. --with-client-ldflags=-all-static           #以纯静态方式编译客户端   
  4. --with-mysqld-ldflags=-all-static           #以纯静态方式编译服务端,提高13%性能(与客户端一起)   
  5. --with-embedded-server                  #编译成embedded MySQL library (libmysqld.a)   
  6. --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock #使用unix套接字链接提高7.5%性能   
  7. --with-tcp-port=3306                    #运行端口   
  8. --with-charset=utf8                 #字符集   
  9. --with-extra-charsets=complex               #字符集支持   
  10. --with-collation=utf8_general_ci   
  11. --localstatedir=/usr/local/mysql/data           #数据库文件路径   
  12. --sysconfdir=/usr/local/mysql/etc           #配置文件路径   
  13. --with-plugins=innobase,myisam,partition        #存储引擎   
  14. --with-big-tables   
  15. --with-ssl   
  16. --enable-local-infile                   #让mysql支持从本地文件 导入数据库   
  17.   
  18. -pgcc                           #如果是Inter处理器,使用pgcc提高1%性能   
  19. --with-mysqld-user=mysql                #运行Mysql用户  
  编译参考:
  1. ./configure --prefix=/usr/local/mysql \ --sysconfdir=/usr/local/mysql/etc \ --with-charset=utf8 \ --with-collation=utf8_general_ci \ --with-plugins=innobase,myisam \ --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock \ --with-embedded-server \ --with-extra-charsets=complex \ --enable-thread-safe-client \ --enable-local-infile \ --enable-assembler \ --with-big-tables \ --with-ssl \ --with-client-ldflags=-all-static \ --with-mysqld-ldflags=-all-static

实际应用中需根据项目本身做相应调整。

阅读(711) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~