如何在Perl中确定Mysql连接ID?
我试图了解,我的模块是否共享与 MySQL 的 DBI 连接。我想确定他们的连接 ID。可能有更好的解决方案(我想知道它们),但第一个问题仍然是关于了解连接 ID。
I am trying to understand, do my modules share DBI connection to MySQL or no. I'd like to determine their connection ID. There may be better solutions (and i'd like to know them), but first question is still about knowing connection ID.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用
CONNECTION_ID
函数,例如:You can use the
CONNECTION_ID
function, e.g.:你也可以尝试这个,正如你提到的 MySQL
From DBD::mysql 文档
You can try this too, as you're mentioning MySQL
From DBD::mysql documentation