Daniel Kim
Daniel Kim

Reputation: 31

Google cloud sql data read audit log

I need to log all the queries on my sql instances, filter those that seem to fetch too many rows and archive it for a period of time.

Doc says

(2) All SQL queries executed on the database instance

about "Data Access audit logs".

So I've set out to enable access audit logs for my cloud sql server. I have checked data read in the audit logs api page as said in here, but I cannot seem to find it anywhere in the log explorer. I have aleady checked log names for "projects/PROJECT_NAME/logs/cloudaudit.googleapis.com%2Fdata_access" to no use.

What am I missing? what am I doing wrong?

Upvotes: 1

Views: 2482

Answers (1)

guillaume blaquiere
guillaume blaquiere

Reputation: 75735

To view the logs in Cloud Logging you need to activate the flag general_log in the MySQL flags feature page.

Upvotes: 2

Related Questions