MYSQL源碼編譯的變動,MYSQL源碼編譯變動
Mysql的安裝,對於mysql不同版本的mysql源碼編譯方式不一樣 5.6.2的版本開始編譯方式已經由 configure 變成了cmake方式 ,相關的新的編譯方式在mysql官網已經提供 http://dev.mysql.com/doc/refman/5.6/en/source-configuration-options.html 源碼如下http://dev.mysql.com/downloads/mysql/ 網上相關mysql5.6的源碼編譯方式http://www.chenyudong.com/archives/building-mysql-5-6-from-source.html對於版本5.6之前的mysql,編譯方式還是傳統的編譯方式。./configure make && make install此種編譯方式是傳統方式,具體配置參數 如 nginx 如下下面是MYSQL5.6之前的編譯配置參數(來自網友資料)--prefix=PREFIX:指定程式安裝路徑;--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-profiling:Build 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-mutexes:Compile 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伺服器端支援的儲存引擎組件(預設為空白),可選值較多:partition:MySQL Partitioning Support;daemon_example:This is an example plugin daemon;ftexample:Simple full-text parser plugin;archive:Archive Storage Engine;blackhole:Basic Write-only Read-never tables;csv:Stores tables in text CSV format,強制安裝;example:Example for Storage Engines for developers;federated:Connects to tables on remote MySQL servers;heap:Volatile memory based tables,強制安裝;ibmdb2i:IBM DB2 for i Storage Engine;innobase:Transactional Tables using InnoDB;innodb_plugin:Transactional Tables using InnoDB;myisam:Traditional non-transactional MySQL tables,強制安裝;myisammrg:Merge multiple MySQL tables into one,強制安裝;ndbcluster:High 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/ --with-server-suffix=yu--enable-assembler --enable-local-infile --enable-thread-safe-client --with-big-tables --with-charset=utf8 --with-extra-charsets=gbk,gb2312,utf8,ascii --with-readline --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
著作權聲明:本文為博主原創文章,未經博主允許不得轉載。