星期六, 十一月 11, 2006

debian php and mysql upgrade

今天心血來潮, 突然想到來把 php & mysql 一起升級, 升級到 php5 & mysql5 ~

升級流程:

  1. backup mysql, mysql config, php config
  2. mysqldump --all-databases --user=root --password='xxx' > mysql-date.sql
  3. tar zcvf mysql-date.tgz /var/lib/mysql # 保險還是整個壓起來, 出問題可以 rollback 用
  4. tar zcvf mysql_conf.tgz /etc/mysql
  5. tar zcvf php_conf.tgz /etc/php4
  6. apt-get install php5 ... (和 其它相關 package, 這個在 restart apache 時看錯誤, 再解決即可)
  7. apache 會出現的錯誤大概就是 php4.conf 要移掉 .. 還有在 php.ini 若有修改, 在 php5 也記得要改.
  8. apt-get install mysql-server (自動會抓 mysql-server 5.0)

沒想到這麼簡單就升級完成, 不用做任何匯入匯出的動作~ :p

目前看起來狀況好像還不錯, 先試用看看囉 :)

相關標籤

this is comment icon [回覆]

您好,可否請教:
安裝完後重新啟動 /etc/init.d/mysql restart 會出現:
Checking for corrupt, not cleanly closed and upgrade needing tables..
屢試不爽...。 從 google 爬文也找不出所以然。
請問您是否也會有出現這樣的訊息呢? 是否會影響正常運作呢?

Comment by Kenming Wang (10/10/2007 21:22)

this is comment icon 回 Kenming Wang [回覆]

這個我當初也是有發現這個問題, 也是有嘗試去解決.
但是還是不斷出現, 後來就不管他了 XD...
不過這不會影響正常運作就是了~ 不用擔心 :)

Comment by Tsung (10/11/2007 09:18)

this is comment icon [回覆]

我後來也在摩拖學園得到回覆,也是一樣說不用去管它。
虛驚一場!! 感謝您的回應 !^^

Comment by Kenming Wang (10/11/2007 15:27)
Add this page to del.icio.us Add this page to Yahoo Taiwan's bookmark Add this page to MyShare

發表迴響

標題

內容 (限制 1000 字)

暱稱

電子郵件

個人網頁


 authimage


PS: 若無法留言, 請先確認是否有打開 JavaScript, 造成您的困擾, 實在萬分對不起 Orz...(如果無法留言, 勞煩可以發信給我好嗎? 謝謝.)
PS2: 若您的留言被誤判, 我都會再自行看過, 不需要一直重覆張貼~