When connecting to a Google Cloud SQL instance, is there a way to specify the database I want to connect to?
This is the command I execute and the error I get:
In the meanwhile the beta version of the gcloud sql connect command has added support for a --database= flag
gcloud sql connect
--database=
Entire command: gcloud beta sql connect INSTANCE [--database=DATABASE, -d DATABASE] [--user=USER, -u USER] [GCLOUD_WIDE_FLAG …]
gcloud beta sql connect INSTANCE [--database=DATABASE, -d DATABASE] [--user=USER, -u USER] [GCLOUD_WIDE_FLAG …]
https://cloud.google.com/sdk/gcloud/reference/beta/sql/connect