在 FreeBSD 用 ports 安裝 MySQL 5.5

我在 FreeBSD 用 ports 安裝 databases/mysql41-serverdatabases/mysql50-server 時,會放這些 configuration parameters:

  • WITH_CHARSET=big5
  • WITH_XCHARSET=all
  • BUILD_OPTIMIZED

databases/mysql51-server 會多放個 WITH_FAST_MUTEXES

之前要安裝 databases/mysql55-server 時發現…
databases/mysql55-server 只剩下 WITHOUT_OPENSSLWITH_FASTMTX 這兩個 configuration parameters 可以用,而預設的 WITH_EXTRA_CHARSETS(文章前頭提到的 WITH_XCHARSET)就是 all;以往使用的 WITH_CHARSET=big5 必須從 my.cnf 作設定(這也的確是比較好的作法);BUILD_OPTIMIZED 則是不需要了(也不支援?)。

另外,databases/mysql55-server 預設只有這些 storage engines

mysql> SHOW ENGINES;
+--------------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine             | Support | Comment                                                    | Transactions | XA   | Savepoints |
+--------------------+---------+------------------------------------------------------------+--------------+------+------------+
| MRG_MYISAM         | YES     | Collection of identical MyISAM tables                      | NO           | NO   | NO         |
| CSV                | YES     | CSV storage engine                                         | NO           | NO   | NO         |
| MyISAM             | DEFAULT | MyISAM storage engine                                      | NO           | NO   | NO         |
| InnoDB             | YES     | Supports transactions, row-level locking, and foreign keys | YES          | YES  | YES        |
| PERFORMANCE_SCHEMA | YES     | Performance Schema                                         | NO           | NO   | NO         |
| MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables  | NO           | NO   | NO         |
+--------------------+---------+------------------------------------------------------------+--------------+------+------------+
6 rows in set (0.00 sec)

ARCHIVEBLACKHOLEEXAMPLEFEDERATED 這四個 storage engines 可以透過 INSTALL PLUGIN 的方式進行安裝,例:

mysql> INSTALL PLUGIN archive SONAME 'ha_archive.so';
mysql> INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
mysql> INSTALL PLUGIN example SONAME 'ha_example.so';
mysql> INSTALL PLUGIN federated SONAME 'ha_federated.so';
Tweet 20
fb-share-icon20