CloudSQL warning: your action is needed to update your application and avoid potential disruptions. Please see https://cloud.google.com/sql/docs/mysql/connect-app-engine-standard for additional details: ...
以下错误消息表示连接到 Cloud SQL 的操作未成功完成:
Cloud SQL connection failed. Please see https://cloud.google.com/sql/docs/mysql/connect-app-engine-standard for additional details: ...
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-20。"],[[["\u003cp\u003eThis page outlines various strategies for connecting to and from App Engine, including using Serverless VPC Access and internal IP addresses.\u003c/p\u003e\n"],["\u003cp\u003eTo connect from a Virtual Private Cloud (VPC) to App Engine using an internal IP address, you must set up Private Google Access and a Private Service Connect endpoint.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine instances can connect to Cloud SQL over private IP addresses, utilizing Serverless VPC Access for the standard environment and direct VPC connection for the flexible environment.\u003c/p\u003e\n"],["\u003cp\u003eWhen working with multiple App Engine services, access permissions can be customized using App Engine with Identity-Aware Proxy (IAP).\u003c/p\u003e\n"],["\u003cp\u003eConnection issues between App Engine and Cloud SQL often stem from incorrect configuration of the Cloud SQL Auth proxy, and may require updating permissions or checking the instance connection name.\u003c/p\u003e\n"]]],[],null,["# App Engine connectivity strategies\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\nThis page describes commonly used App Engine connectivity\nstrategies, including steps related to using [Serverless VPC Access](/vpc/docs/serverless-vpc-access) and internal IP addresses.\n\n- [Connect from VPC to App Engine instances](#set-up-connectivity-from-vpc-to-app-engine)\n- [Connect App Engine to Cloud SQL private IP addresses](#sql-connectivity)\n- [Customize access permissions between App Engine services](#access-permissions)\n\nConnect from VPC to App Engine instances\n----------------------------------------\n\nServerless VPC Access is useful when making calls from Google's\nserverless offerings to a Virtual Private Cloud (VPC) network, but you can't\naccess App Engine instances using an internal IP address.\n\nTo connect to App Engine from the VPC network using an\ninternal IP address without an assigned external IP address, do the following:\n\n1. Set up [Private Google Access](/vpc/docs/private-google-access). Ensure that the App Engine service uses a Private Google Access-enabled subnet.\n2. Use a [Private Service Connect](/vpc/docs/private-service-connect) endpoint. Ensure that the endpoint is connected to the Private Google Access-enabled subnet.\n3. Send traffic to the Private Service Connect endpoint. Ensure that the endpoint is connected to the subnet.\n\nApp Engine instances with external IP addresses can send traffic to\nPrivate Service Connect endpoints without any requirements.\n\n### Outbound connection resets\n\nGoogle Cloud can occasionally terminate and replace connection streams from your\napplication to both [VPC](/appengine/docs/standard/connecting-vpc)\nand the internet when updating or restarting the underlying infrastructure. If your application reuses long-lived connections, we recommend that you configure your application to\nre-establish connections to avoid the reuse of a dead connection.\n\nCustomize access permissions between App Engine services\n--------------------------------------------------------\n\nWhen you have multiple App Engine services and\nwant to configure access permissions differently between services (for example,\nyou want to enable access to App Engine Service A only from App Engine Service B), you can use\n[App Engine with Identity-Aware Proxy (IAP)](/solutions/authenticating-web-users).\n\nFor more information, see [Controlling access to websites and apps](/solutions/authenticating-web-users) and [IAP documentation](/iap/docs/authenticate-users-google-accounts).\n\nConnect App Engine to Cloud SQL private IP addresses\n----------------------------------------------------\n\nTo connect your App Engine apps to [Cloud SQL](/sql)\ninstances over private IP addresses, use one of the following options:\n\n- **App Engine standard environment** : Use the [Serverless VPC Access connector](/vpc/docs/serverless-vpc-access) to connect to Cloud SQL over internal IP addresses. For more information, see [Connecting from App Engine standard environment to Cloud SQL](/sql/docs/mysql/connect-app-engine-standard#configuring).\n- **App Engine flexible environment** : Deploy your flexible environment app in the same VPC network as your Cloud SQL instance. Your app should now be able to connect directly using Cloud SQL instance's private IP address. For more information, see [Connecting from App Engine flexible environment to Cloud SQL](/sql/docs/mysql/connect-app-engine-flexible#configuring).\n\n### Troubleshoot issues connecting an App Engine app to Cloud SQL\n\nWhen deploying an older App Engine standard environment app with Cloud SQL using Unix\nsockets, you might see a few error messages if your app isn't correctly\nconfigured to connect to a Cloud SQL instance. For detailed steps to\nconfigure your app, see [Connect from App Engine standard environment](/sql/docs/mysql/connect-app-engine-standard#configure).\n\nThe following warning message indicates that App Engine was able to fall\nback on a legacy connection method to complete the operation successfully: \n\n```\nCloudSQL warning: your action is needed to update your application and avoid potential disruptions. Please see https://cloud.google.com/sql/docs/mysql/connect-app-engine-standard for additional details: ... \n```\n\nThe following error message indicates that the operation to connect to\nCloud SQL wasn't completed successfully: \n\n```\nCloud SQL connection failed. Please see https://cloud.google.com/sql/docs/mysql/connect-app-engine-standard for additional details: ...\n```\n\nFor both error messages, check the following to ensure that the\n[Cloud SQL Auth proxy](/sql/docs/mysql/connect-admin-proxy) is correctly\nconfigured to connect to a Cloud SQL instance:\n\n- The Cloud SQL Admin API must be enabled.\n- The service account for the App Engine app must have the correct permissions.\n- The instance connection name must include the region.\n\nIf the failure message persists after troubleshooting, contact\n[Google Cloud Support](https://support.google.com/cloud/#topic=3473162)\nfor assistance."]]