Compute Engine Instance and SQL instance (2nd gen) in same project won't connect

193 zobrazení
Přeskočit na první nepřečtenou zprávu

Michael Mancini

nepřečteno,
12. 4. 2017 9:06:4512.04.17
komu: Google Cloud SQL discuss
Unfortunately I cannot seam to find an answer that fits my situation!

I have followed the following guides when trying to connect a compute instance running CentOS 7 and docker to my Cloud SQL instance using the docker-proxy and can never connect on completion!


when I run gcloud compute instances describe [instance-name] i can verify the scope for https://www.googleapis.com/auth/cloud-platform is enabled

I run: sudo yum install mysql
- no errors
I then run: sudo usermod -aG docker $USER
-no errors

- no errors

I then configure using TCP sockets as follows:

sudo docker run -d -v /cloudsql:/cloudsql \
-p 127.0.0.1:3306:3306 \
-instances=mycloud-sql-connection-name:us-central1:mysql-cloud-db-name=tcp_0.0.0.0:3306

after I hit enter a logn string is passed back
6aa53XXXXXXd58b4622337XXXXXXXXc92dec645dXXXXXXXXXa7eXXXX
-no errors produced

NOTE: configuring the TCP socket (the directions say to exclude the -v [PATH_TO_KEY_FILE]:/config and -credential_file=/config when you are on a Compute Engine instance (which I am)

I then run: mysql -u username -p --host 127.0.0.1

and get this error:
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)

If anyone can point in the right direction to resolving this I would greatly appreciate it!

Again both these instances are under the same project on GCP and have credentials set to allow all access from apps and instances within the project!

I've been at this for hours with no luck...

~sidgrafix

Pia Chamberlain

nepřečteno,
13. 4. 2017 13:20:5513.04.17
komu: Google Cloud SQL discuss
Hi Michael,
Sorry you've been having issue. One suggestion-- 
this could possibly be SELinux issue. See step 4 here:
 

Let us know if that solves it!

Duc Eric

nepřečteno,
7. 5. 2017 12:55:3807.05.17
komu: Google Cloud SQL discuss
HI Pla.
I follow the instruction however I can not connect to sql cloud.
I get stuck in `./cloud_sql_proxy -instances=<INSTANCE_CONNECTION_NAME>=tcp:3306`
If possible, could you give me a short video ?
Thank you

Pia Chamberlain

nepřečteno,
8. 5. 2017 11:52:0408.05.17
komu: google-cloud...@googlegroups.com
Sorry, we don't have any videos for this task yet. 

--
You received this message because you are subscribed to a topic in the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-cloud-sql-discuss/aGR33zDUDgg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/f5de2357-ad6a-4428-887e-21b90fe11a82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Pia Chamberlain | Technical Writer | pi...@google.com | Cloud SQL

Duc Eric

nepřečteno,
9. 5. 2017 9:32:2309.05.17
komu: Google Cloud SQL discuss
Thank you for supporting
Odpovědět všem
Odpověď autorovi
Přeposlat
0 nových zpráv