This is a collection of scripts used to demonstrate how to get started with Google Cloud SQL. Follow the step by step procedures in this video: Getting Started with Google Cloud SQL
Prerequisites:
-
Sign up for Google Cloud SQL, if you haven't already.
-
Download and install MySQL Community Server which includes the MySQL Command-line client tool.
- MySQL Command-line client settings:
- host: IP address (shown in video)
- port: 3306 (normal)
- configuration: nothing special other than MySQL Command-line client installed
- MySQL Command-line client settings:
-
Download and Install the gcutil command line tool. This will be used for interacting with a Google Compute Engine VM instance in order to connect it to Cloud SQL.
Inventory of scripts:
SQL script to create a MySQL database and populate it with sample data:
- schema_and_data.sql : This will be run from the MySQL command line client tool.
Setup scripts for installing PHP and phpMyAdmin on a Compute Engine VM:
- setup-php.sh : Install the software necessary to serve PHP pages from a Compute Engine VM.
- setup-phpmyadmin.sh : Install the software necessary to run phpMyAdmin on a Compute Engine VM.
Example PHP Pages:
- index-gce.php : Example PHP page running on Compute Engine that connects to a Cloud SQL instance.
- index-appengine.php : Example PHP page running on App Engine that connects to a Cloud SQL instance.
These instructions and code samples were made to accompany the screencast linked in the README.md above at the time the video was made.
The current instructions for using Cloud SQL for MySQL with PHP and App Engine Standard can be found at:
https://github.com/GoogleCloudPlatform/php-docs-samples/tree/main/cloud_sql/mysql/pdo#google-app-engine-standard
Regarding your specific question:
See the current example yaml file at:
https://github.com/GoogleCloudPlatform/php-docs-samples/blob/main/cloud_sql/mysql/pdo/app.standard.yaml