Re: [google-cloud-sql-discuss] Is it possibile to view in StackDriver logging all sql queries that runs on Cloud SQL second generation?

307 views
Skip to first unread message

David Newgas

unread,
Apr 26, 2016, 12:53:06 PM4/26/16
to Google Cloud SQL discuss
If you want to view all queries that run, you must set general_log=TRUE and log_output=TABLE following https://cloud.google.com/sql/docs/mysql-flags. The output is stored in the mysql.general_log table, and is in CSV format.

As CSV is inefficient and can massively increase restart times, we strongly recommend you keep this table small by frequently truncating it. If you need to preserve the contents use INSERT ... SELECT. See https://cloud.google.com/sql/docs/mysql-flags#tips-general-log

On Tue, Apr 26, 2016 at 12:14 AM, Amina <amin...@gmail.com> wrote:


--
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-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/c8507cfc-bccf-41c3-9be2-590a4a99d699%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Holger Latz

unread,
Jul 12, 2016, 3:20:48 AM7/12/16
to Google Cloud SQL discuss

How to get rid of mysql.general_log table to free up storage? Removing flags has no effect and DROP, TRUNCATE or DELETE is not allowed.

Holger

Herman Tai

unread,
Jul 12, 2016, 11:35:14 AM7/12/16
to Google Cloud SQL discuss
Please send your instance info (full instance name) to clou...@google.com and the Cloud SQL team will take care of this, thanks.

Almeno Soares

unread,
Apr 14, 2017, 1:10:28 PM4/14/17
to Google Cloud SQL discuss, hta...@google.com
Hi,

Same problem here Guys, need to truncate general_log table.

Almeno.

Vadim Berezniker

unread,
Apr 14, 2017, 1:12:50 PM4/14/17
to Google Cloud SQL discuss, hta...@google.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-d...@googlegroups.com.

Almeno Soares

unread,
Apr 17, 2017, 10:43:40 AM4/17/17
to Google Cloud SQL discuss, hta...@google.com
Thanks Vladimir for the tip. Solved.



sexta-feira, 14 de Abril de 2017 às 18:12:50 UTC+1, Vadim Berezniker escreveu:
On Fri, Apr 14, 2017 at 10:10 AM Almeno Soares <alm...@gmail.com> wrote:
Hi,

Same problem here Guys, need to truncate general_log table.

Almeno.




terça-feira, 12 de Julho de 2016 às 16:35:14 UTC+1, Herman Tai escreveu:
Please send your instance info (full instance name) to clou...@google.com and the Cloud SQL team will take care of this, thanks.


On Tuesday, July 12, 2016 at 12:20:48 AM UTC-7, Holger Latz wrote:

How to get rid of mysql.general_log table to free up storage? Removing flags has no effect and DROP, TRUNCATE or DELETE is not allowed.

Holger


Am Dienstag, 26. April 2016 18:53:06 UTC+2 schrieb David Newgas:
If you want to view all queries that run, you must set general_log=TRUE and log_output=TABLE following https://cloud.google.com/sql/docs/mysql-flags. The output is stored in the mysql.general_log table, and is in CSV format.

--
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+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages