Skip to content

Cloudsql readme #481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

Cloudsql readme #481

wants to merge 4 commits into from

Conversation

evanj
Copy link

@evanj evanj commented Sep 20, 2016

Description

Fix incorrect information in the README.md file:
To connect to Cloud SQL, you need to pass the entire "instance name",
which is of the form: project-id:region:instance-name. For example:
my-project:us-central1:my-cloudsql-instance

Checklist

  • Code compiles correctly
  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the README / documentation, if necessary
  • Added myself / the copyright holder to the AUTHORS file

Evan Jones added 2 commits September 20, 2016 17:40
To connect to Cloud SQL, you need to pass the entire "instance name",
which is of the form: project-id:region:instance-name. For example:
  my-project:us-central1:my-cloudsql-instance
@arnehormann
Copy link
Member

Can you link to official docs describing the format? We have to crosscheck, the link to the docs makes it simpler.

@lennrt
Copy link
Contributor

lennrt commented Sep 25, 2016

@arnehormann It looks like the official docs are still outdated. I am having an issue with the connection string as well, as are other people.

@evanj
Copy link
Author

evanj commented Sep 26, 2016

@lrudolph1 thanks for looking up a reference. I think the following effectively mentions this:

From https://cloud.google.com/sql/docs/external#go

Connection statement:

const dsn = "root@unix(/cloudsql/<INSTANCE_CONNECTION_NAME>)/"
db, err := sql.Open("mysql", dsn)

The Cloud SQL proxy docs say: https://cloud.google.com/sql/docs/external#6_start_the_proxy

1. Copy your instance connection name from the Instance details page.

I'm going to update this pull request accordingly. Thanks!

@evanj
Copy link
Author

evanj commented Sep 26, 2016

I included a link, but the documentation I linked to isn't super helpful. I reported a documentation bug to Google but don't hold your breath. I still think including an example would be consistent with all the other examples, and very useful given that Google's official documentation is actually either incorrect or missing an example like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants