Tuesday, May 18, 2021

Re: [google-cloud-sql-discuss] Re: why i got these queries on log every 1-2 seconds ?

Hi,

You can find your service account on the IAM & Admin > IAM page. Depending on if you create your own service account or used the default the may look like this[1]

[1]https://cloud.google.com/sql/docs/mysql/roles-and-permissions#serverless-roles-permissions

On Monday, May 17, 2021 at 9:17:47 AM UTC-4 ho...@interactivelabs.co wrote:

hi wushawn,

where can i find my service account ?

Thanks
hong

On Saturday, May 15, 2021 at 5:07:07 PM UTC-7 wushawn wrote:
Can you double confirm the service account you use  ? it seems something related to the IAM not set properly. 
On Friday, May 14, 2021 at 1:37:17 PM UTC-4 ho...@interactivelabs.co wrote:
no, i think because there are too many roles. 
Any suggestions for max roles for best practices?

Thanks
hong


On Thu, May 13, 2021 at 4:15 PM 'David (Cloud Platform Support)' via Google Cloud SQL discuss <google-cloud...@googlegroups.com> wrote:

Hello,

Do you have pg_stat_statements enabled? Seems like something it would be logged if you do. 


On Thursday, May 13, 2021 at 9:46:21 AM UTC-4 ho...@interactivelabs.co wrote:
WITH non_cloudsql_users AS (
SELECT * FROM pg_catalog.pg_user WHERE usename NOT LIKE 'cloudsql%'),
iam_roles AS (
SELECT pg_catalog.pg_has_role(usename, 'cloudsqliamuser', 'member') AS is_iam_user,
pg_catalog.pg_has_role(usename, 'cloudsqliamserviceaccount', 'member') AS is_svc_acct
FROM non_cloudsql_users)
SELECT pg_catalog.SUM(is_iam_user::int),
pg_catalog.SUM(is_svc_acct::int),
pg_catalog.SUM((NOT(is_iam_user OR is_svc_acct))::int),
current_timestamp
FROM iam_roles

Why this happen ? how to stop it ?

Thanks
hong

--
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/GDzR8uilu2c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/da2919ec-6c99-46f7-a830-b8cd684fd17dn%40googlegroups.com.

--
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/d3ddc4fe-965e-4915-a95f-71527feb711dn%40googlegroups.com.

No comments:

Post a Comment