Friday, March 29, 2019

[google-cloud-sql-discuss] Read from mysql.slow_log; inconsistent application of SUPER privileges

I have a 2nd Generation Mysql instance in Google Cloud SQL. I've turned on slow query logging with log_output set to TABLE and I'd like to read from that table.

When I connect to my instance remotely as root, and I run this:

    SELECT * FROM mysql.`slow_log`;

I get a beautiful set of rows, and I am happy.

When I put this query in my App Engine production code (which also connects as root) and deploy, I get this error:

    Access denied; you need (at least one of) the SUPER privilege(s) for this operation
and I am sad.

I understand that Cloud SQL doesn't support SUPER privileges. But why can I read from this table remotely, but not when deployed? Can I somehow apply the privileges I have when connecting remotely that allow this query to succeed to my deployed connection? Any other way of exporting the data in this table?

--
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/f85736cc-9631-4c34-a688-17e6f8640bfb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment