Dear google-cloud-sql-discuss,
I tried to connect to a cloud sql instance from cloud shell by proxy. The API seems to go through, but I don't know why I cannot connect. The context is following,
Error message from Proxy
Error Message from Client
Steps:
1. have the sql instance running.
2. create a service account with Cloud SQL API permission
3. Get the JASON file to connect, and the API log shows the successful connection.Part of the API log
4. "gcloud beta sql connect auth-instance2 --user=root" can connect.
My db instance: playground-158007:asia-east1:auth-instance2
Please let me know if you have some clue. Any pointer for debugging is welcome.
Thanks in advance.
Yin-shen
-- I tried to connect to a cloud sql instance from cloud shell by proxy. The API seems to go through, but I don't know why I cannot connect. The context is following,
Error message from Proxy
couldn't connect to playground-158007:asia-east1:auth-instance2": dial tcp 104.199.247.40:3307: getsockopt: connection timed out"
Error Message from Client
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Steps:
1. have the sql instance running.
2. create a service account with Cloud SQL API permission
3. Get the JASON file to connect, and the API log shows the successful connection.Part of the API log
serviceName: "cloudsql.googleapis.com"
methodName: "cloudsql.instances.connect"
./cloud_sql_proxy -instances=playground-158007:asia-east1:auth-instance2=tcp:3306 -credential_file=playground-3d345c8ab9b3.json
4. "gcloud beta sql connect auth-instance2 --user=root" can connect.
My db instance: playground-158007:asia-east1:auth-instance2
Please let me know if you have some clue. Any pointer for debugging is welcome.
Thanks in advance.
Yin-shen
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/57b8c98f-9d77-4e84-9b42-fbf4fadae2a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment