作者chigi ()
看板Database
标题[系统] 请问一下MySQL和python的连接关系
时间Mon Nov 16 02:15:43 2009
这个问题是从
OperationalError: (2006, 'MySQL server has gone away')
来的,
我把错误讯息拿进google去查了一下,
说大部分都是因为timeout之後,connect就挂了,而新版的MySQL的某个flag预设为0
详见
http://mclee.foolme.net/2007/01/mysql-server-has-gone-away.html
我的问题在於,对於Python的MySQL套件(MySQLdb, build on py2.5)
只能使用 MySQLdb.connect(host, ..) 做连接,
那mysql_real_connect又是怎麽使用呢?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.113.166.90