使用QGTUNNEL(价格)分开PymySQL数据库连接的任何地方的最佳方法?
我们正在运行15-20个不同的python脚本,这些脚本都与同一数据库交谈。该脚本是通过有时会同时运行的不同任务进行安排的,在启动QGTUNNEL时我们会遇到以下错误...
2022/05/16 12:52:11 Error initializing tcp socket 127.0.0.1:3306: listen tcp 127.0.0.1:3306: bind: address already in use
2022/05/16 12:52:11 Error initializing tcp socket 127.0.0.1:1433: listen tcp 127.0.0.1:1433: bind: address already in use
我们考虑要求我们的MySQL提供商让MySQL在更多端口上收听,但他们不允许这样做。我们还考虑过每个脚本都有不同的环境,但是在尝试之前,我想询问是否有更好的方法。感谢建议。
We are running 15-20 different python anywhere scripts that all talk to the same database. The script are scheduled through different tasks that are sometimes running simultaneously and we get the following error when launching qgtunnel...
2022/05/16 12:52:11 Error initializing tcp socket 127.0.0.1:3306: listen tcp 127.0.0.1:3306: bind: address already in use
2022/05/16 12:52:11 Error initializing tcp socket 127.0.0.1:1433: listen tcp 127.0.0.1:1433: bind: address already in use
We thought about asking our mysql provider to have mysql listen on more ports but they don't allow that. We also thought about having a different environment for each script but before we try that I wanted to ask if there's a better way. Apprecite the advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,在与配额合作后,他们的CTO有了一个好主意。在运行每个脚本之前,覆盖.qgtunnel设置文件并指定您的端口。我将其推出了所有脚本,现在没有绑定错误。覆盖设置文件看起来像这样...
So after working with quotaquard their CTO had a great idea. Before running each script overwrite the .qgtunnel settings files and specify your port. I rolled that out to all the scripts and now I have no binding errors. Overwriting the settings file looks like this...