2
votes

i cannot access the cloud sql(mysql) using private ip on vpc, then this message show.

ERROR 1045 (28000): Access denied for user 'root'@'10.146.15.196' (using password: YES)

i have confirmed the following items.

  • use unix socket of cloud proxy, i can access and login with the same username and password (check username and password)
  • In the user table of the msql database, root is host:% (check mysql allow ip)
  • The request is being made using cloud logging (request can arrives)
  • Connection test passes https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/how-to/running-connectivity-tests (configuration is correct)
  • use private ip of connect with tcp of cloud proxy, then i can login (check connect with tcp, and private ip)
  • create another cloud sql instance same region then i can login this instance using private ip. (check region problem)

What's wrong?

1
Could you post the code you're using to connect to the instance? (don't post password) - Gabe Weiss
ok mysql -u root -p --host [private ip] this cannot access. mysql -u root -p -S /cloudsql/[instanceID] this can access. mysql -u root -p --host 127.0.0.1 this can access then i use cloud proxy target incstances ( ./cloud_sql_proxy -ip_address_types=PRIVATE --instances=[instanceID]=tcp:3306 ). - 佐藤慧太
This is all from a machine that's inside the VPC? Like, from a GCE instance? From the Cloud Console? - Gabe Weiss
from GCE instance! - 佐藤慧太
Ah HA! I see you got it resolved by turning off ssl only connections. :) You should answer yourself and then accept the answer so others can find/search for it easier! - Gabe Weiss

1 Answers

3
votes

i was self resolved!

the instance has setting of ssl/tls. i can login then it turn off!