阅读背景:

Python mysql(使用pymysql)自动重新连接

来源:互联网 

I'm not sure if this is possible, but I'm looking for a way to reconnect to mysql database when the connection is lost. All the connections are held in a gevent queue but that shouldn't matter I think. I'm sure if I put some time in, I can come up with a way to reconnect to the database. However I was glancing pymysql code and I saw that there is a 'ping' method in Connection class, which I'm not sure exactly how to use. I'm not sure if this is possible, but I'm looki




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: