[問題] Python + MySQL

看板Python作者 (2009 我們要去環島)時間13年前 (2011/03/15 02:09), 編輯推噓0(002)
留言2則, 2人參與, 最新討論串1/1
大家好,小弟是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
怕誤會 你應該不是在gae下用MySQL吧
03/15 08:57, 1F

03/15 11:18, , 2F
回樓上 不是啦XD
03/15 11:18, 2F
文章代碼(AID): #1DVbd8xl (Python)