<?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>遨遊飛翔 &#187; MySQL</title>
	<atom:link href="http://blog.shian.tw/tag/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.shian.tw</link>
	<description>學習筆記 For php、jQuery、MySql、Centos、Suse、Server、CodeIgniter</description>
	<lastBuildDate>Sun, 09 Oct 2011 16:00:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://blog.shian.tw/?pushpress=hub'/>
		<item>
		<title>Mysql backup to Dropbox</title>
		<link>http://blog.shian.tw/mysql-backup-to-dropbox.html</link>
		<comments>http://blog.shian.tw/mysql-backup-to-dropbox.html#comments</comments>
		<pubDate>Sun, 13 Feb 2011 16:00:00 +0000</pubDate>
		<dc:creator>shian</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[隨手記]]></category>

		<guid isPermaLink="false">http://blog.shian.tw/?p=800</guid>
		<description><![CDATA[先前介紹過安裝Dropbox於centos中後，接下來我們可以把一些資料備份的dropbox裡面，本篇將介紹備份Mysql資料於Dropbox裡，方式相當的簡單容易。 shell script ?View Code BASH1 vi /srv/mysql_backup.sh ?View Code BASH1 2 3 4 5 6 7 #!/bin/sh date=`date -I` for I in $&#40;mysql -u root -pPASSWORD -e 'show databases' -s --skip-column-names&#41;; do echo $I mysqldump -u root -pPASSWORD $I &#8230; <a href="http://blog.shian.tw/mysql-backup-to-dropbox.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.shian.tw/mysql-backup-to-dropbox.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySql Report &#8211; Replication Error</title>
		<link>http://blog.shian.tw/mysql-report-error.html</link>
		<comments>http://blog.shian.tw/mysql-report-error.html#comments</comments>
		<pubDate>Sun, 25 Apr 2010 16:00:38 +0000</pubDate>
		<dc:creator>shian</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.shian.tw/?p=425</guid>
		<description><![CDATA[之前公司的mysql有做 Mysql Replication，所以把一些常發生的錯誤以及發生斷線(沒同步)時，要如何處理以及建議改善的簡易評估報告。 發生斷時錯誤查詢 1. 進入 slave mysql 後 SHOW SLAVE STATUS; 2. 查看 mysqld.log 發生 "Duplicate Key" 錯誤 此為最常發生的錯誤而導致斷線，猜測有可能因為 replication lag 的關係，導致slave 與 master 資料發生重覆或是不存在，而剛好要對這筆資料進行動作處理，或是正要對這筆資料同步時。 解決 "Duplicate Key" 錯誤 1. 在 slave db 跳過重覆的資料 2. 人工去判斷並將資料砍掉或匯進去缺少的部份 3. 排程進行判斷並跳過 目前處理發生錯誤(斷線)機制 將 &#8230; <a href="http://blog.shian.tw/mysql-report-error.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.shian.tw/mysql-report-error.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysql to json</title>
		<link>http://blog.shian.tw/mysql-to-json.html</link>
		<comments>http://blog.shian.tw/mysql-to-json.html#comments</comments>
		<pubDate>Sun, 10 May 2009 16:00:10 +0000</pubDate>
		<dc:creator>shian</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.shian.tw/?p=301</guid>
		<description><![CDATA[最近剛好在 phpclasses 裡看到有人提供 mysql_to_json，這似乎是挺有趣的一個東西，在好奇之下把檔案抓來試用看看，使用相當簡單而且檔案又很小，或許之後會有用到。在php裡直接寫好條件查詢sql後再丟給這隻去回傳資料庫查到的資料，嗯…或許也是一個方式。 檔案 mysql_to_json 使用 載入mysql_to_json class ?View Code PHP1 include&#40;‘mysql_to_json.class.php’&#41;; 方式1 ?View Code PHP1 2 3 4 5 // 建立一個新的mysql_to_json介面 $mtj = new mysql_to_json&#40;$query&#41;; &#160; //輸出 echo $mtj-&#62;get_json&#40;&#41;; 方式2 ?View Code PHP1 2 3 4 5 //建立一個新的空的mysql_to_json &#8230; <a href="http://blog.shian.tw/mysql-to-json.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.shian.tw/mysql-to-json.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Query Cache</title>
		<link>http://blog.shian.tw/mysql-query-cache.html</link>
		<comments>http://blog.shian.tw/mysql-query-cache.html#comments</comments>
		<pubDate>Thu, 17 Jan 2008 17:41:25 +0000</pubDate>
		<dc:creator>shian</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.shian.tw/?p=48</guid>
		<description><![CDATA[MySQL 也有 cache可以使用! 提高資料庫效能有很重要的效用,可以節約大量的 CPU 時間 ,並且設定也非常的簡單,但是MySQL的版本要4以上才有這功能!! 設定: 1. 修改 /etc/my.cnf 檔案 # vi /etc/my.cnf 2.在 [mysqld] 裡加入下面這2行 query_cache_size=2m query_cache_type = 1 註: query_cache_type = 1 =&#62; 全部使用 query cache query_cache_type = 2 =&#62; 選擇性使用或不使用 query cache SELECT SQL_CACHE &#8216;*&#8217; FROM table &#8230; <a href="http://blog.shian.tw/mysql-query-cache.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.shian.tw/mysql-query-cache.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mysql 5.1.22 Replication Master to Slave</title>
		<link>http://blog.shian.tw/mysql-5122-replication-master-to-slave.html</link>
		<comments>http://blog.shian.tw/mysql-5122-replication-master-to-slave.html#comments</comments>
		<pubDate>Mon, 14 Jan 2008 17:10:00 +0000</pubDate>
		<dc:creator>shian</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.shian.tw/?p=47</guid>
		<description><![CDATA[Mysql 5.1.22 Replication Master to Slave 預設環境 Master = 192.168.1.102 Slave = 192.168.1.103 要進行資料同步的資料庫 = shian Mysql 安裝位置 = /usr/local/mysql 注意: 我所安裝的Mysql是用Tarball方式安裝,所以下面的Mysql路徑會有所不一樣 , 請依照你的主機路徑做變更 安裝流程 1. 在Master上開一個帳號給Slave 2. 關閉 Master 的 MySQL 3. 備份要同步化的資料庫 4. 編輯 /etc/my.cnf 檔 5. 啟動 Master 的MySQL &#8230; <a href="http://blog.shian.tw/mysql-5122-replication-master-to-slave.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.shian.tw/mysql-5122-replication-master-to-slave.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tarball MySQL</title>
		<link>http://blog.shian.tw/tarball-mysql.html</link>
		<comments>http://blog.shian.tw/tarball-mysql.html#comments</comments>
		<pubDate>Fri, 23 Nov 2007 10:06:11 +0000</pubDate>
		<dc:creator>shian</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.shian.tw/?p=29</guid>
		<description><![CDATA[安裝MySQL有很多方式,像是 CENTOS的YUM或是SUSE的YAST2,或是下載RPM來安奘, 但是為了想要讓MySQL預設的編碼為UTF-8,所以就自己用Tarball的方式來安裝 準備: 到Mysql 官網下載 Source 安裝: 1. 增加一位叫 mysql 的使用者帳號 # adduser mysql 2.進入解壓縮後的Mysql目錄下,並開始編譯 # ./configure &#8211;prefix=/usr/local/mysql &#8211;localstatedir=/usr/local/mysql/var &#8211;with-charset=utf8 # make # make install 參數說明: &#8211;prefix 設定安裝Mysql的位置 &#8211;localstatedir 設定資料庫檔的存放位置 &#8211;with-charset 設定預設語系 3. 開啟預設資料庫/表格: # scripts/mysql_install_db 4. 改變 /usr/local/mysql &#8230; <a href="http://blog.shian.tw/tarball-mysql.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.shian.tw/tarball-mysql.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

