I am trying to display audit logs for Cloud-SQL in the stack-driver-console. I have already enabled audit-log for Cloud-SQL in IAM.
I connect to mysql or postgres databases in Cloud-SQL and when I connect these audit logs are displayed in the console.
But after this if i perform any operation in that particular database like SELECT or INSERT or DELETE, there is no audit-log (data-access) generated for both mysql and postgres. In mysql instance I have set the following database flags
audit_log ON (this is in beta version)For mysql if i add 1 more flag **general_log** I am able to get those DML statements but they come under a different log **cloudsql.googleapis.com%2Fmysql-general.log** and don't come under audit-logs
Similarly for post-gres these statements come under a different log:
**cloudsql.googleapis.com%2Fpostgres.log**I am new to this Cloud-SQL so not aware of the logging implemented there. Why no audit logs are generated when any DML is done for the particular database in that Cloud-SQL instance and should I set any other flag for this purpose? Can anyone please help?
Thanks.
Hello,
I see you have asked this on Stackoverflow and gotten a response from us. Please continue the interaction within the Stackoverflow post.