[go: up one dir, main page]

Skip to main content
Google Cloud
Documentation Technology areas
  • AI and ML
  • Application development
  • Application hosting
  • Compute
  • Data analytics and pipelines
  • Databases
  • Distributed, hybrid, and multicloud
  • Generative AI
  • Industry solutions
  • Networking
  • Observability and monitoring
  • Security
  • Storage
Cross-product tools
  • Access and resources management
  • Costs and usage management
  • Google Cloud SDK, languages, frameworks, and tools
  • Infrastructure as code
  • Migration
Related sites
  • Google Cloud Home
  • Free Trial and Free Tier
  • Architecture Center
  • Blog
  • Contact Sales
  • Google Cloud Developer Center
  • Google Developer Center
  • Google Cloud Marketplace
  • Google Cloud Marketplace Documentation
  • Google Cloud Skills Boost
  • Google Cloud Solution Center
  • Google Cloud Support
  • Google Cloud Tech Youtube Channel
/
  • English
  • Deutsch
  • Español
  • Español – América Latina
  • Français
  • Indonesia
  • Italiano
  • Português
  • Português – Brasil
  • 中文 – 简体
  • 中文 – 繁體
  • 日本語
  • 한국어
Console Sign in
  • App Engine
  • Quick links
  • App Engine standard environment
    Learn about the standard environment
  • App Engine flexible environment
    Learn about the flexible environment
  • App Engine Migration Center
    Learn how to migrate to the latest supported versions
Guides Reference Resources
Contact Us Start free
Google Cloud
  • Documentation
    • Quick links
      • More
    • Guides
    • Reference
    • Resources
  • Technology areas
    • More
  • Cross-product tools
    • More
  • Related sites
    • More
  • Console
  • Contact Us
  • Start free
  • App Engine flexible environment
  • App Engine home
  • Flexible environment overview
  • Choose a language and environment
  • Discover flexible environment runtimes
  • Go runtime
    • Overview
    • Create an app
  • Java runtime
    • Overview
    • Create an app
    • Re-package a WAR file
  • Node.js runtime
    • Overview
    • Create an app
  • PHP runtime
    • Overview
    • Create an app
  • Python runtime
    • Overview
    • Create an app
  • Ruby runtime
    • Overview
    • Create an app
  • .NET runtime
    • Overview
    • Create an app
  • Custom runtimes
    • Overview
    • Create an app
  • Get started
  • Set up your environment
    • Set up your development environment
    • Set up optional tools for Java
      • Apache Maven
        • Use Maven and the App Engine Plugin
        • Maven Plugin Goals and Parameters
      • Gradle
        • Use the App Engine Plugin
        • Tasks and Properties
    • Set up your Cloud project
  • Grant access
    • Set up access control
    • View roles that grant access to App Engine
    • Configure service accounts
    • Google-managed service agent
  • Migrate existing services
    • Migrate services from the standard environment
    • Migrate App Engine apps to Kubernetes Engine
    • Migrate to split health checks
  • Design your app
    • Structure web services
    • Communicate between your services
    • Handle requests
    • Route requests
  • Build custom runtimes
    • All runtimes
    • Customize the .NET Runtime
    • Customize the PHP Runtime
    • Customize the Python Runtime
  • Define configuration files
    • Go
      • Define runtime settings
      • Specify dependencies
    • Java
      • Define runtime settings
      • Specify dependencies
      • Configure the web.xml deployment descriptor
    • .NET
      • Define runtime settings
      • Specify dependencies
    • Node.js
      • Define runtime settings
      • Specify dependencies
    • PHP
      • Define runtime settings
      • Specify dependencies
    • Python
      • Define runtime settings
      • Specify dependencies
    • Ruby
      • Define runtime settings
      • Specify dependencies
    • Custom runtimes
      • Define runtime settings
  • Test and deploy your app
  • Configure your app
  • Set up networking
    • Map custom domains
    • Secure custom domains with SSL
    • Secure your app with minimum TLS
    • Virtual private cloud (VPC)
      • Connect to a Shared VPC network
    • Configure private internal-only services
    • Create persistent connections with webSockets
  • Store data and files
    • Overview
    • Use Cloud Firestore in Datastore mode
    • Use Cloud SQL
    • Use Cloud Storage (cloud file hosting)
    • Store and serve static files
  • Create triggers
    • Write and respond to Pub/Sub messages
    • Send messages with third-party services
  • Secure your app
    • Overview
    • Specify Ingress settings
    • Understand firewalls
    • Create firewall rules
    • Authenticate users
  • Operate and maintain
  • Manage instances
  • Label resources
  • Manage your app's traffic
    • Migrate traffic
    • Split traffic
  • Schedule cron jobs
  • Run asynchronous tasks
  • Automate tasks
  • Get started with the Admin API
  • Monitor, log, and debug
  • Access audit logs
  • Write and view logs
  • Monitoring and alerting latency
  • Debug an Instance
  • Understand Performance with Cloud Profiler
  • Migration center
  • Migration resources
  • Troubleshoot
  • Introduction
  • Deployment
  • Serving
  • Elevated latency
  • Connectivity
  • Custom runtimes
  • Known issues
  • Community resources
  • AI and ML
  • Application development
  • Application hosting
  • Compute
  • Data analytics and pipelines
  • Databases
  • Distributed, hybrid, and multicloud
  • Generative AI
  • Industry solutions
  • Networking
  • Observability and monitoring
  • Security
  • Storage
  • Access and resources management
  • Costs and usage management
  • Google Cloud SDK, languages, frameworks, and tools
  • Infrastructure as code
  • Migration
  • Google Cloud Home
  • Free Trial and Free Tier
  • Architecture Center
  • Blog
  • Contact Sales
  • Google Cloud Developer Center
  • Google Developer Center
  • Google Cloud Marketplace
  • Google Cloud Marketplace Documentation
  • Google Cloud Skills Boost
  • Google Cloud Solution Center
  • Google Cloud Support
  • Google Cloud Tech Youtube Channel
  • Quick links
  • App Engine standard environment
  • App Engine flexible environment
  • App Engine Migration Center
  • Home
  • Documentation
  • Application hosting
  • App Engine
  • Flexible Environment

Use Cloud SQL
Stay organized with collections Save and categorize content based on your preferences.

This page describes how to connect to a Cloud SQL instance from a service running in the App Engine flexible environment.

For a more detailed overview, see What is Cloud SQL in the Cloud SQL documentation.

You can connect to your Cloud SQL instance using:

  • MYSQL
  • PostgreSQL

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-02 UTC.

  • Why Google

    • Choosing Google Cloud
    • Trust and security
    • Modern Infrastructure Cloud
    • Multicloud
    • Global infrastructure
    • Customers and case studies
    • Analyst reports
    • Whitepapers
  • Products and pricing

    • See all products
    • See all solutions
    • Google Cloud for Startups
    • Google Cloud Marketplace
    • Google Cloud pricing
    • Contact sales
  • Support

    • Community forums
    • Support
    • Release Notes
    • System status
  • Resources

    • GitHub
    • Getting Started with Google Cloud
    • Google Cloud documentation
    • Code samples
    • Cloud Architecture Center
    • Training and Certification
    • Developer Center
  • Engage

    • Blog
    • Events
    • X (Twitter)
    • Google Cloud on YouTube
    • Google Cloud Tech on YouTube
    • Become a Partner
    • Google Cloud Affiliate Program
    • Press Corner
  • About Google
  • Privacy
  • Site terms
  • Google Cloud terms
  • Manage cookies
  • Our third decade of climate action: join us
  • Sign up for the Google Cloud newsletter Subscribe
  • English
  • Deutsch
  • Español
  • Español – América Latina
  • Français
  • Indonesia
  • Italiano
  • Português
  • Português – Brasil
  • 中文 – 简体
  • 中文 – 繁體
  • 日本語
  • 한국어