开发者

How to get the socket FD from MySQLdb connection

开发者 https://www.devze.com 2023-04-06 00:02 出处:网络
I开发者_如何学Go use MySQLdb to fetch data from mysql and I need the connected socket to do someting else。

I开发者_如何学Go use MySQLdb to fetch data from mysql and I need the connected socket to do someting else。 Is there some way to get it ? Thanks !


From the documentation:

import MySQLdb
db=MySQLdb.connect(passwd="moonpie",db="thangs")

db is what you call your "connected socket"

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号