Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Logging of SQL Commands in Logs Explorer from Cloud SQL Service

Hello Community,

I would like to know if SQL commands, such as SELECT * FROM..., executed on a Cloud SQL instance are logged and can be viewed in Logs Explorer. Specifically, I am interested in understanding whether these types of queries are captured by defaullt or there is additional configuration required to enable this level of logging.

Thank you in advance for the support !

Solved Solved
1 1 1,312
1 ACCEPTED SOLUTION

Hello @Zorghost  ,Welcome on Google Cloud Community.

AFAIR, you can do it such config with Database Flags, but flag depends which SQL you are using. 
More info about flags here: https://cloud.google.com/sql/docs/mysql/flags

Check also DB audit rules:
https://cloud.google.com/sql/docs/mysql/use-db-audit#configure-auditing

--
cheers,
DamianS
LinkedIn medium.com Cloudskillsboost

View solution in original post

1 REPLY 1

Hello @Zorghost  ,Welcome on Google Cloud Community.

AFAIR, you can do it such config with Database Flags, but flag depends which SQL you are using. 
More info about flags here: https://cloud.google.com/sql/docs/mysql/flags

Check also DB audit rules:
https://cloud.google.com/sql/docs/mysql/use-db-audit#configure-auditing

--
cheers,
DamianS
LinkedIn medium.com Cloudskillsboost