非常抱歉!
我前面寫錯得很厲害實際上mysql 是4.3.6 版本
minstrel請見諒!
MySQL版本不算舊. 不過看errorlog, 怎麼看也還是MySQL的問題.
用google查了一下, 發現一堆解答. 貼一篇上來. 順便翻一下.
===============================================================================
http://www.mysql.com/doc/G/o/Gone_away.htmlhttp://www.mysql.com/doc/C/o/Common_errors.htmlhttp://www.mysql.com/doc/S/e/Server_parameters.htmlhttp://www.mysql.com/doc/O/p/Option_files.htmlhttp://www.mysql.com/doc/S/H/SHOW_VARIABLES.htmlThe most common reason for the MySQL server has gone away error
(MySQL 消失的常見原因)
1. Is that the server timed out and closed the connection. By default, the server closes the connection after 8 hours or 28800 seconds if nothing has happened. You can change the time limit by setting the wait_timeout variable when you start mysqld via your server's /etc/my.cnf as well.
(Server 連線逾時並切斷連線. Server本身會在8小時或28800秒後, 切斷沒做任何事的連線. 你可以修改 wait_timeout 這個時以更改這個時限. 通常是放在 /etc/my.cnf 檔之中)
2. Another common reason to receive the MySQL server has gone away error is because you have issued a ``close'' on your MySQL connection and then tried to run a query on the closed connection. You can check that the MySQL hasn't died by executing mysqladmin version and examining the uptime.
(另一個常見原因, 是你已切斷連線並嘗試使用已切斷的連線. 你可以執行 mysqladmin 以檢查MySQL是否存在)
i.e. to check mysql uptime, in shell as root user type:
(要檢查mysql的uptime, 請使用下列方式)
mysqladmin -u root -p version
3. You can also get these errors if you send a query to the server that is incorrect or too large. If mysqld gets a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection. If you need big queries (for example, if you are working with big BLOB columns), you can increase the query limit by starting mysqld with the -O max_allowed_packet=# option (default 1M) or via max_allowed_packet variable in your /etc/my.cnf file and restarting mysql after you edited your /etc/my.cnf file. The extra memory is allocated on demand, so mysqld will use more memory only when you issue a big query or when mysqld must return a big result row
(如果你送出的查詢不正確或太大, 亦會產生這個錯誤. 如果mysqld收到一個太大的封包, 它會假設發生了某些錯誤, 並且切斷連線. 如果你需要做大的查詢, 你可以用兩種方式達到. 一是在啟動 mysqld時, 加上參數 -O Max_allowed_packet=###, 另一是在你的 /etc/my.cnf 中修改 max_allowed_packet 的值, 這個值預設是 1M. )
4. or simply your host restarted mysql..
(或者你的主機商剛好重啟mysql)