project-name:region-name:instance-name with your instance's Connection name that appears on the Cloud SQL instances page in the Google Cloud console.
my-db-password with the password of the quickstart-user that you created in Create a user.
PROJECT_ID with your project ID.
At the Cloud Shell command prompt, in the cloudshell_open/java-docs-samples/cloud-sql/mysql/servlet directory, run the following Apache Mavenmvn clean package command to deploy the sample app to App Engine flexible environment.
mvncleanpackageappengine:deploy-DskipTests
When prompted with Do you want to continue?, enter Y.
After the actions performed by running the gcloud app deploy command complete, run the gcloud app browse command:
gcloudappbrowse
Click the generated link to see the sample app running on App Engine flexible environment. This environment is connected to Cloud SQL.
Node.js
Create and download SSL server and client certificates
In the Google Cloud console, go to the Cloud SQL Instances page.
MY_DB_PASSWORD with the password of the quickstart-user that you created in Create a user.
INSTANCE_HOST with your instance's Private IP address that appears on the Cloud SQL instances page in the Google Cloud console.
PROJECT_ID with your project ID.
At the Cloud Shell command prompt, in the cloudshell_open/nodejs-docs-samples/cloud-sql/mysql/mysql directory, run the following gcloud app deploy command to deploy the sample app to App Engine flexible environment.
gcloudappdeployapp.flexible.yaml
When prompted with Do you want to continue?, enter Y.
After the actions performed by running the gcloud app deploy command complete, run the gcloud app browse command:
gcloudappbrowse
Click the generated link to see the sample app running on App Engine flexible environment. This environment is connected to Cloud SQL.
Python
Create and download SSL server and client certificates
In the Google Cloud console, go to the Cloud SQL Instances page.
YOUR_DB_PASSWORD with the password of the quickstart-user that you created in Create a user.
INSTANCE_HOST with your instance's Private IP address that appears on the Cloud SQL instances page in the Google Cloud console.
PROJECT_ID with your project ID.
At the Cloud Shell command prompt, in the cloudshell_open/python-docs-samples/cloud-sql/mysql/sqlalchemy directory, run the following gcloud app deploy command to deploy the sample app to App Engine flexible environment.
gcloudappdeployapp.flexible.yaml
When prompted with Do you want to continue?, enter Y.
After the actions performed by running the gcloud app deploy command complete, run the gcloud app browse command:
gcloudappbrowse
Click the generated link to see the sample app running on App Engine flexible environment. This environment is connected to Cloud SQL.
Clean up
To avoid incurring charges to your Google Cloud account for the resources used on this page, follow these steps.
In the Google Cloud console, go to the Cloud SQL Instances page.
Select the quickstart-instance instance to open the Instance details page.
In the icon bar at the top of the page, click Delete.
In the Delete instance dialog box, type quickstart-instance, and then click Delete to delete the instance. Disabling your app stops it from running instances and serving requests. If your app is processing a request, your app completes the request before being disabled.
To disable an App Engine app and retain its data, do the following:
In the Google Cloud console, go to the Settings page:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-17 UTC."],[],[]]