[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Cloud SQL connectivity insights\n\nThis page describes the Network Analyzer insights for Cloud SQL\nconnectivity. For information about all the\ninsight types, see [Insight groups and types](/network-intelligence-center/docs/network-analyzer/insight-groups-types).\n\nCloud SQL connectivity insights discover connectivity issues from a subnet to\na Cloud SQL instance, where the subnet is in the same\nVirtual Private Cloud (VPC) network as the Cloud SQL instance.\n\nConnectivity tests are performed from an IP address of the subnet to the\nCloud SQL instance by using the TCP protocol and the default ports. The default\nports list depends on the Cloud SQL instance's database version. For more\ninformation about finding the ports of your Cloud SQL instance that are up\nand listening, see [Open local ports](/sql/docs/debugging-connectivity#open_local_ports).\n\nView insights in the Recommender API\n------------------------------------\n\nTo view these insights in the gcloud CLI or the Recommender API, use\nthe following insight type:\n\n- `google.networkanalyzer.managedservices.cloudSqlInsight`\n\nYou need the following permissions:\n\n- `recommender.networkAnalyzerCloudSqlInsights.list`\n- `recommender.networkAnalyzerCloudSqlInsights.get`\n\nFor more information about using the Recommender API for\nNetwork Analyzer insights, see\n[Use the Recommender CLI and API](/network-intelligence-center/docs/network-analyzer/use-cli-recommender-api).\n\nConnectivity to Cloud SQL instance blocked by egress firewall\n-------------------------------------------------------------\n\nThis insight indicates that the connectivity with a Cloud SQL instance is\nblocked by an egress firewall.\n\nThis insight provides the following information:\n\n- **SQL instance:** Name of the Cloud SQL instance.\n- **Network:** Name of the VPC network where the Cloud SQL instance is configured.\n- **Region:** Region where the Cloud SQL instance is configured.\n- **Database version:** Database version of the Cloud SQL instance.\n- **Connectivity drop cause:** The reason why the connectivity is blocked. For this type of insight, it is a blocking firewall.\n- **Blocking firewall:** Name of the firewall that blocks the connectivity.\n- **Unreachable ports:** Port numbers of the Cloud SQL instance that are not reachable.\n\n### Related topics\n\nFor more information, see [Using firewall rules](/vpc/docs/using-firewalls).\n\n### Recommendations\n\nIf the blocking firewall is configured by mistake, delete the blocking firewall.\nAlternatively, you can create an egress firewall rule that allows traffic for\nTCP traffic on port 3307 with a destination IP range matching\nthe Cloud SQL instance's IP address. This rule should have a higher priority\nthan the blocking firewall rule.\n\nConnectivity to Cloud SQL instance blocked by routing issue\n-----------------------------------------------------------\n\nWhen you configure a Cloud SQL instance that uses a private IP address,\nprivate service connection is configured to allow resources in your\nVPC network to connect to the Cloud SQL instance. The private\nservice connection automatically creates a VPC peering between\nyour VPC network and a Google managed service network.\n\nThis insight shows that the connectivity from your network to a Cloud SQL\ninstance is blocked by a routing issue. This is caused by an accidental\ndeletion of the VPC peering between your VPC\nnetwork and the Google managed service network.\n\nThis insight provides the following information:\n\n- **SQL instance:** Name of the Cloud SQL instance.\n- **Network:** Name of the VPC network where the Cloud SQL instance is configured.\n- **Region:** Region where the Cloud SQL instance is configured.\n- **Database version:** Database version of the Cloud SQL instance.\n- **Connectivity drop cause:** The reason why the connectivity is blocked. For this type of insight, it is missing network peering.\n- **Unreachable ports:** Port numbers of the Cloud SQL instance that are not reachable.\n\n### Related topics\n\nFor more information, see\n[Configuring private IP](/sql/docs/mysql/configure-private-ip).\n\n### Recommendations\n\nOn the **Insight details** page, click the URI of the SQL instance field to go to\nthe Cloud SQL page. On the **Connection** page, the following notification is\nshown:\n**Private services access connection required**.\n\nClick **Set up connection** and follow the steps to recreate a private service\nconnection.\n\nConnectivity to Cloud SQL instance issue: instance not running\n--------------------------------------------------------------\n\nThis insight indicates that the connectivity with a Cloud SQL instance\nis blocked because the Cloud SQL instance is not running.\n\nThis insight includes the following information:\n\n- **SQL instance:** Name of the Cloud SQL instance.\n- **Network:** Name of the VPC network where the Cloud SQL instance is configured.\n- **Region:** Region where the Cloud SQL instance is configured.\n- **Database version:** Database version of the Cloud SQL instance.\n\n### Related topics\n\nFor more information, see\n[Starting, stopping, and restarting instances](/sql/docs/mysql/start-stop-restart-instance).\n\n### Recommendations\n\nRestart the Cloud SQL instance."]]