<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>算法交易-Bali &#187; MySQL</title>
	<atom:link href="http://libaocun.com/tag/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://libaocun.com</link>
	<description>Think globally, act locally.</description>
	<lastBuildDate>Fri, 06 Jan 2012 02:51:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Install MySQL from source in a Linux box</title>
		<link>http://libaocun.com/install-mysql-from-source-in-a-linux-box</link>
		<comments>http://libaocun.com/install-mysql-from-source-in-a-linux-box#comments</comments>
		<pubDate>Sat, 20 Feb 2010 06:32:42 +0000</pubDate>
		<dc:creator>Bali</dc:creator>
				<category><![CDATA[一些老文章]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://balionweb.com/?p=384</guid>
		<description><![CDATA[I had a CentOS Linux box bundled with a MySQL with Latin as default charset. As time goes by, I need a) utf-8 everywhere(client, server, collation, everywhere) to support Chinese. b) Innodb as default engine Here is what I did: 1) Download latest source(mysql-5.1.44) from MySQL site 2) rpm -i xxx.src.rpm to install the source. [...]]]></description>
			<content:encoded><![CDATA[<p>I had a CentOS Linux box bundled with a MySQL with Latin as default charset. As time goes by, I need</p>
<p>a) utf-8 everywhere(client, server, collation, everywhere) to support Chinese.</p>
<p>b) Innodb as default engine</p>
<p>Here is what I did:</p>
<p>1) Download latest source(mysql-5.1.44) from MySQL site</p>
<p>2) <strong>rpm -i xxx.src.rpm</strong> to install the source. By default, the source will be installed to /usr/src/redhat/SOURCES/mysql-5.1.44.</p>
<p>3) Go the root dir of source, run:</p>
<blockquote><p>CFLAGS=&#8221;-O3&#8243; CXX=gcc CXXFLAGS=&#8221;-O3 -felide-constructors \<br />
-fno-exceptions -fno-rtti&#8221; ./configure \<br />
&#8211;prefix=/usr/local/mysql &#8211;enable-assembler \<br />
&#8211;with-mysqld-ldflags=-all-static \<br />
&#8211;with-charset=utf8 \<br />
&#8211;with-collation=utf8_general_ci \<br />
&#8211;with-plugins=all</p></blockquote>
<p>Explain: use gcc as compiler; install mysql to /usr/local/mysql; utf8 as default char set; install all plugins including innodb.</p>
<p>During this process, you may see errors saying &#8220;I need this, I need that&#8221;, use &#8216;<strong>yum</strong>&#8216; to install them.</p>
<p>And <strong>./configure &#8211;help</strong> will show all possible options.</p>
<p>4) <strong>make</strong></p>
<p>5) <strong>make install</strong></p>
<p>And /usr/local/mysql will be the rool dir of new mysql installation.</p>
<p>6) Modify /etc/my.cnf. /usr/src/redhat/SOURCES/mysql-5.1.44/support-files/ contains sample configuration files. Note to set below:</p>
<blockquote><p>[mysqld]</p>
<p>default-storage-engine = INNODB</p></blockquote>
<p>7) Modify /etc/init.d/mysqld. You may need sym-link to new mysql installation.</p>
<p>Done. Below message should prove the installation is fine:</p>
<blockquote><p>mysql&gt; show engines;<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;+<br />
| Engine     | Support | Comment                                                        | Transactions | XA   | Savepoints |<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;+<br />
| ndbcluster | NO      | Clustered, fault-tolerant tables                               | NULL         | NULL | NULL       |<br />
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |<br />
| BLACKHOLE  | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |<br />
| CSV        | YES     | CSV storage engine                                             | NO           | NO   | NO         |<br />
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables      | NO           | NO   | NO         |<br />
| FEDERATED  | NO      | Federated MySQL storage engine                                 | NULL         | NULL | NULL       |<br />
| ARCHIVE    | YES     | Archive storage engine                                         | NO           | NO   | NO         |<br />
| InnoDB     | DEFAULT | Supports transactions, row-level locking, and foreign keys     | YES          | YES  | YES        |<br />
| MyISAM     | YES     | Default engine as of MySQL 3.23 with great performance         | NO           | NO   | NO         |<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;+<br />
9 rows in set (0.00 sec)</p>
<p>mysql&gt; show variables like &#8216;%char%&#8217;;<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| Variable_name            | Value                                  |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| character_set_client     | utf8                                   |<br />
| character_set_connection | utf8                                   |<br />
| character_set_database   | utf8                                   |<br />
| character_set_filesystem | binary                                 |<br />
| character_set_results    | utf8                                   |<br />
| character_set_server     | utf8                                   |<br />
| character_set_system     | utf8                                   |<br />
| character_sets_dir       | /usr/local/mysql/share/mysql/charsets/ |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
8 rows in set (0.00 sec)</p>
<p>mysql&gt; show variables like &#8216;%colla%&#8217;;<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| Variable_name        | Value           |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| collation_connection | utf8_general_ci |<br />
| collation_database   | utf8_general_ci |<br />
| collation_server     | utf8_general_ci |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
3 rows in set (0.00 sec)</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://libaocun.com/install-mysql-from-source-in-a-linux-box/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

