會產生這個錯誤的原因是 PHP 所使用的 MySQL lib 和 MySQL 的版本不搭,
解決方式是重新編譯 PHP, configure 時加入 --with-mysql=/usr 指定 MySQL 正確位置.
最後用 phpinfo() 檢查一下 MySQL Client API version 和系統是否一致.
ref: PHP誌:File `NONEXISTENT/charsets/?.conf` not found (Errcode: 2)
Notes: December 2006 Archives
MySQL Replication 可以把資料庫即時複製到另一台主機, MySQL 備援、Load Balance 都會用到.
範例: A(Master, IP:10.1.1.1) -> B(Slave)
先把兩邊的 MySQL 停掉, 把 A 的資料庫複製到 B, 用 tar 的就可以了.
A(Master) my.cnf 設定
[mysqld]
server-id=1
log-bin
binlog-do-db=dbname
B(Slave) my.cnf 設定
[mysqld]
server-id=2
log-bin
master-host=10.1.1.1
master-user=root
master-password=password
replicate-do-db=dbname
log-slave-updates
Slave 必需有權限可以存取 Master 的指定資料庫, 設完後啟動兩邊的 MySQL.
檢查:
在 A 進入 mysql -u root
show master status; 看看有無指定資料庫的資料.
在 B 進入 mysql -u root
show slave status; 看看有無指定資料庫的資料, 並且有兩個 Yes.
測試:
在 A 指定資料庫建立一個新的 Table, 看看 B 有沒有自動建立.
若無法成功, 把兩邊的 MySQL 停掉, 到 MySQL 資料目錄(預設在/var/lib/mysql),
rm -f *-bin.* *.info
再把兩邊的 MySQL 啟動.
ref. MySQL Replication 設定分享
接近聖誕節, 開始促銷各式各樣的聖誕節禮物, Spam 數量會攀升, 稱 Christmas Spam.
附圖是 pank.org 使用 bogofilter 所過濾出的 Spam 統計.
大概11月中, Spam 數量就開始竄高.
ref. Don't let Christmas spam fill your email stocking, Sophos warns
November 2007: Monthly Archives
- November 2007 (1)
- October 2007 (1)
- September 2007 (2)
- July 2007 (4)
- June 2007 (1)
- April 2007 (4)
- March 2007 (5)
- February 2007 (3)
- January 2007 (2)
- December 2006 (3)
- November 2006 (4)
- October 2006 (1)
- September 2006 (4)
- July 2006 (4)
- June 2006 (9)
- May 2006 (4)
- April 2006 (2)
- March 2006 (1)
- January 2006 (4)
- December 2005 (2)
- November 2005 (3)
- October 2005 (2)
- September 2005 (8)
- August 2005 (20)
- July 2005 (10)
- June 2005 (13)
- May 2005 (15)
- April 2005 (15)
- March 2005 (13)
- February 2005 (6)
- January 2005 (8)
- December 2004 (19)
- November 2004 (17)
- October 2004 (7)
- September 2004 (7)
- August 2004 (12)
- July 2004 (17)
- June 2004 (12)
- May 2004 (9)
- April 2004 (17)
- March 2004 (6)
- February 2004 (3)
- January 2004 (8)
- December 2003 (10)
- November 2003 (9)
- October 2003 (8)
- September 2003 (6)
- August 2003 (9)
- July 2003 (9)
Categories
Monthly Archives
- March 2008 (1)
- February 2008 (5)
- January 2008 (2)
- November 2007 (4)
- October 2007 (8)
- September 2007 (7)
- August 2007 (3)
- July 2007 (10)
- June 2007 (4)
- May 2007 (5)
- April 2007 (9)
- March 2007 (11)
- February 2007 (7)
- January 2007 (4)
- December 2006 (9)
- November 2006 (14)
- October 2006 (10)
- September 2006 (9)
- August 2006 (6)
- July 2006 (15)
- June 2006 (22)
- May 2006 (17)
- April 2006 (13)
- March 2006 (18)
- February 2006 (10)
- January 2006 (28)
- December 2005 (17)
- November 2005 (15)
- October 2005 (18)
- September 2005 (24)
- August 2005 (39)
- July 2005 (14)
- June 2005 (22)
- May 2005 (32)
- April 2005 (27)
- March 2005 (32)
- February 2005 (20)
- January 2005 (38)
- December 2004 (49)
- November 2004 (38)
- October 2004 (24)
- September 2004 (23)
- August 2004 (38)
- July 2004 (39)
- June 2004 (38)
- May 2004 (17)
- April 2004 (32)
- March 2004 (15)
- February 2004 (6)
- January 2004 (19)
- December 2003 (19)
- November 2003 (15)
- October 2003 (15)
- September 2003 (12)
- August 2003 (20)
- July 2003 (26)
Pages
Search
March 2008
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
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 | 28 | 29 |
30 | 31 |
About this Archive
This page is a archive of entries in the Notes category from December 2006.
Notes: November 2006 is the previous archive.
Notes: January 2007 is the next archive.
Find recent content on the main index or look in the archives to find all content.