烧瓶应用程序在大约一天之后失去了与MySQL数据库的连接

发布于 2025-01-27 19:50:53 字数 232 浏览 5 评论 0原文

我正在使用Python烧瓶作为后端,将其作为GCP实例中的服务运行。一旦开始服务,它就能正常工作。但是经过一天的一天,我试图将其称为API损失与MySQL的联系,并显示以下

错误mysql.connector.errors.interfaceerror:2013:

我尝试使用pymysql和mysql.connector,但面临相同的错误。有什么办法解决这个问题吗?

I'm using python flask as a backend, running it as a service in the GCP instance. It is working correctly once started the service. But after a day when I try to make an API call it losses its connection with MySQL and shows the following

error mysql.connector.errors.InterfaceError: 2013:

I tried using pymysql and mysql.connector but facing the same error. Is there any way to solve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文