'Unable to Access CloudSQL MYSQL5.7 From Service Account Using CLI
I have simple cloudsql instance for MYSQL_5_7 with enable_iam_authentication flag on.
I have added service account or IAM user and want to access the instance using mysql client.
I am using cloudsql auth proxy:
./cloud_sql_proxy -instances=watchful-pier-333707:us-central1:test-002=tcp:3306 --enable_iam_login
Accessing the DB with below command:
mysql -u root -p --host 127.0.0.1
Using Built-in user root I am successfully able to access the instance.
When I am trying to access the DB with IAM user/service account using below command, I am getting "Lost connection to MySQL server at 'reading authorization packet', system error: 0".
mysql -u <user_name> -p --host 127.0.0.1
user_name is the one I can see as added user in user's list
Following this documentation - this
Can anyone please help. Thanks in advance!
Solution 1:[1]
Automatic IAM AuthN isn't yet available for MySQL. Once it is, we'll update the proxy docs.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | enocom |
