Mysql 常用编译参数注解

Mysql 常用编译参数注解

 

--enable-assembler					#允许使用汇编模式(使用一些字符函数的汇编版本),可以提高性能
--enable-thread-safe-client				#客户端线程安全
--with-client-ldflags=-all-static			#以纯静态方式编译客户端
--with-mysqld-ldflags=-all-static			#以纯静态方式编译服务端,提高13%性能(与客户端一起)
--with-embedded-server					#编译成embedded MySQL library (libmysqld.a)
--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock	#使用unix套接字链接提高7.5%性能

--with-tcp-port=3306					#运行端口
--with-charset=utf8					#字符集
--with-extra-charsets=complex				#字符集支持
--with-collation=utf8_general_ci
--localstatedir=/usr/local/mysql/data			#数据库文件路径
--sysconfdir=/usr/local/mysql/etc			#配置文件路径
--with-plugins=innobase,myisam,partition		#存储引擎
--with-big-tables
--with-ssl
--enable-local-infile					#让mysql支持从本地文件 导入数据库

-pgcc							#如果是Inter处理器,使用pgcc提高1%性能
--with-mysqld-user=mysql				#运行Mysql用户
 

编译参考:

./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 
 

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

 

 

你可能感兴趣的:(源码,mysql,编译)