GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — java-docs-samples/appengine-java8/cloudsql/README.md at master · LanceQuare/java-docs-samples

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
35 lines (26 loc) · 1.5 KB
/

README.md

Copy path

File metadata and controls

35 lines (26 loc) · 1.5 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Cloud SQL sample for Google App Engine

This sample demonstrates how to use Cloud SQL on Google App Engine

Setup

Before you can run or deploy the sample, you will need to create a Cloud SQL instance)

  1. Create a new user and database for the application. The easiest way to do this is via the Google Developers Console. Alternatively, you can use MySQL tools such as the command line client or workbench.
  2. Change the root password (under Access Control) and / or create a new user / password.
  3. Create a Database (under Databases) (or use MySQL with gcloud beta sql connect <instance> --user=root)
  4. Note the Instance connection name under Overview > properties (It will look like project:instance for 1st Generation or project:region:zone for 2nd Generation)

or

gcloud sql instances describe <instance> | grep connectionName

Deploying

$ mvn clean appengine:deploy -DINSTANCE_CONNECTION_NAME=instanceConnectionName -Duser=root
-Dpassword=myPassword -Ddatabase=myDatabase

Or you can update the properties in pom.xml

Running locally

$ mvn clean appengine:run -DINSTANCE_CONNECTION_NAME=instanceConnectionName -Duser=root -Dpassword=myPassowrd -Ddatabase=myDatabase

Note - you must use a local mysql instance for the 1st Generation instance and change the local Url in src/main/webapp/WEB-INF/appengine-web.xml to use your local server.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.