[問題] Python + MySQL
大家好,小弟是Python新手
想請教些問題
我用Python + Django來開發網站
之前用GAE的時候沒啥問題
現在連結MySQL卻無法連結
我已經將MySQL-Python安裝完
import MySQLdb 也不會發生錯誤
不過無論是用Django的db API (在setting.py設定)
或是直接用MySQLdb.connect連結資料庫都會卡在Validing models
並在數分鐘後出現以下錯誤
OperationalError
(2013, "Lost connection to MySQL server at 'reading initial communication
packet', system error: 0")
我查過這可能是連線逾時,但並沒有顯示哪裡出錯
請版上各位幫我解答,謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 180.177.119.237
※ 編輯: SilvesterW 來自: 180.177.119.237 (03/15 03:17)
→
03/15 08:57, , 1F
03/15 08:57, 1F
→
03/15 11:18, , 2F
03/15 11:18, 2F