<?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>Leo の Blog &#187; MySQL</title>
	<atom:link href="http://blog.openider.com/archives/category/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.openider.com</link>
	<description>Where there is a will there is a way! Trust youself can do it!</description>
	<lastBuildDate>Thu, 27 Aug 2009 10:42:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>玩玩 MySQL 更新 Memcached (2) MySQL 服务器</title>
		<link>http://blog.openider.com/archives/176</link>
		<comments>http://blog.openider.com/archives/176#comments</comments>
		<pubDate>Thu, 27 Aug 2009 10:31:21 +0000</pubDate>
		<dc:creator>Guya</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[memcached]]></category>

		<guid isPermaLink="false">http://blog.openider.com/?p=176</guid>
		<description><![CDATA[现在配置 MySQL 数据库服务器 和 MySQL 的 Memcached 扩展.
下载最新版的 mysql 5.1 二进制包. 这里使用 mysql-5.1.37-linux-i686-icc-glibc23.tar.gz

tar zxf mysql-5.1.37-linux-i686-icc-glibc23.tar.gz
sudo mv mysql-5.1.37-linux-i686-icc-glibc23 /usr/local/mysql
sudo groupadd mysql
sudo useradd -g mysql mysql
cd /usr/local/mysql
sudo chown -R mysql .
sudo chgrp -R mysql .
sudo scripts/mysql_install_db --user=mysql
sudo chown -R root .
sudo chown -R mysql data
sudo cp support-files/my-medium.cnf /etc/my.cnf
sudo support-files/mysql.server start
sudo bin/mysqladmin -u root password 'rootpwd'
sudo bin/mysql -u [...]]]></description>
		<wfw:commentRss>http://blog.openider.com/archives/176/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>玩玩 MySQL 更新 Memcached (1) 目标</title>
		<link>http://blog.openider.com/archives/169</link>
		<comments>http://blog.openider.com/archives/169#comments</comments>
		<pubDate>Thu, 27 Aug 2009 08:16:02 +0000</pubDate>
		<dc:creator>Guya</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[trigger]]></category>

		<guid isPermaLink="false">http://blog.openider.com/?p=169</guid>
		<description><![CDATA[玩玩 MySQL 5.1 的 trigger,  让 MySQL 通过 Trigger 更新 本地的 Memcached 服务器. 数据库 主从模式. 具体模拟测试配置如下：
Master DB Server IP: 192.168.2. 92 (Ubuntu-8.04 base system + mysql 5.1.37)
Slave DB Server IP: 192.168.2.93 (同上)
Memcached Server 1: 192.168.2. 95 (Ubuntu-8.04 base system + memcached-1.4)
Memcached Server 2: 192.168.2.96 (同上)
假设 Memcached Server 1 和 Master DB Server 是一个本地环境, Memcached Server [...]]]></description>
		<wfw:commentRss>http://blog.openider.com/archives/169/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql 同步 trigger 更新 memcache</title>
		<link>http://blog.openider.com/archives/163</link>
		<comments>http://blog.openider.com/archives/163#comments</comments>
		<pubDate>Wed, 26 Aug 2009 09:09:35 +0000</pubDate>
		<dc:creator>Guya</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[trigger]]></category>

		<guid isPermaLink="false">http://blog.openider.com/?p=163</guid>
		<description><![CDATA[聊一下通过 MySQL 通过触发器更新本地的 Memcached 服务器.
模拟一下服务器环境：
Master Database Server: 192.168.2.96
Slave Database Server: 192.168.2.95
和 master db 同步的 memcache 服务器: 192.168.2.92
和 slave db 同步的 memcache 服务器: 192.168.2.93
先搭建 Memcached 服务器环境：
下载安装 Memcached, 编译安装.

wget http://memcached.googlecode.com/files/memcached-1.4.0.tar.gz
tar zxf memcached-1.4.0.tar.gz
./configure --prefix=/usr
make
sudo make install
&#160;
wget http://download.tangent.org/libmemcached-0.31.tar.gz
cd libmemcached-0.31/
./configure --prefix=/usr
make
sudo make install

启动 Memcached 服务, 在另一台机器用PHP测试一下:

sudo memcached -d -m 64 -u root -l 192.168.2.92 -p 11211 -c 64 -P /tmp/memcached.pid

检查一下 [...]]]></description>
		<wfw:commentRss>http://blog.openider.com/archives/163/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>安装 libmemcached, memcache_functions_mysql</title>
		<link>http://blog.openider.com/archives/95</link>
		<comments>http://blog.openider.com/archives/95#comments</comments>
		<pubDate>Wed, 17 Jun 2009 05:04:55 +0000</pubDate>
		<dc:creator>Guya</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[libmemcached]]></category>
		<category><![CDATA[udfs]]></category>

		<guid isPermaLink="false">http://blog.openider.com/?p=95</guid>
		<description><![CDATA[我们到目标是 mysql 同步更新 memcache 服务器. 为此我们给它装上必要到软件. 现在要安装的是 libmemcache 和 memcache_functions_mysql 两个软件包. 下载地址为:
libmemcached: http://download.tangent.org/libmemcached-0.30.tar.gz
memcache_functions_mysql: http://download.tangent.org/memcached_functions_mysql-0.8.tar.gz
安装libmemcached需要装机器上已经安装 memcache, 这个前面已经有介绍. 这里不再说明.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
wget http://download.tangent.org/libmemcached-0.30.tar.gz
&#160;
wget http://download.tangent.org/memcached_functions_mysql-0.8.tar.gz
&#160;
tar -zxf libmemcached-0.30.tar.gz
&#160;
tar -zxf memcached_functions_mysql-0.8.tar.gz
&#160;
cd libmemcached-0.30
&#160;
./configure
&#160;
make
&#160;
sudo make install
&#160;
sudo ln -s /usr/local/lib/libmemcached.so.2 /usr/lib/
&#160;
cd ../memcached_functions_mysql-0.8
&#160;
./configure --with-mysql=/usr/local/mysql/bin/mysql_config --libdir=/usr/local/mysql/lib/
&#160;
make
&#160;
sudo make install
&#160;
/usr/local/mysql/bin/mysql -u root -p

说明一下. libmemcached 安装后要装 /usr/lib 里建一个链接, 不然 memcache_functions_mysql 包编译不过. 它会提示 找不到 libmemcached.
如果编译安装的 mysql 装编译 memcache_functions_mysql 包时 使用参数 --libdir=/usr/local/mysql/lib/mysql/ 假设 [...]]]></description>
		<wfw:commentRss>http://blog.openider.com/archives/95/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>简单的 MySQL 主从配置.</title>
		<link>http://blog.openider.com/archives/84</link>
		<comments>http://blog.openider.com/archives/84#comments</comments>
		<pubDate>Mon, 15 Jun 2009 10:25:26 +0000</pubDate>
		<dc:creator>Guya</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[slave]]></category>
		<category><![CDATA[主从]]></category>

		<guid isPermaLink="false">http://blog.openider.com/?p=84</guid>
		<description><![CDATA[服务器环境 Ubuntu-8.04.2 base-system + 编译环境. 安装 mysql 请参考本站前面系列文章.
数据库服务器Master, 主机名:DB01, IP: 192.168.1.234
数据库服务器Slave, 主机名:DB02, IP: 192.168.1.235
先配置 Master 的 mysql 环境.
修改mysql的配置文件 my.cnf 确保有下面的信息, 没有加上. 有的话修改成下面这样. 其他的可以保持默认配置.
[mysqld]
log-bin = mysql-bin
server-id = 1
#for innodb extra setting.
#innodb_flush_log_at_trx_commit = 1
#sync_binlog = 1
创建测试数据库,数据表.

CREATE DATABASES anjuke
USE anjuke
CREATE TABLE IF NOT EXISTS `tests` &#40;
`id` int&#40;11&#41; NOT NULL AUTO_INCREMENT,
`content` text,
`created` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY &#40;`id`&#41;
&#41; ENGINE=MyISAM  [...]]]></description>
		<wfw:commentRss>http://blog.openider.com/archives/84/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
