Monday, April 8, 2019

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

Hi Christopher,


As your issue seems to be a specific technical issue you would have better assistance from the community by posting in StackOverflow as Google Groups is intended for general discussion. You should post to StackOverflow with extra log information to have the developer community assist you.


Thanks!



On Friday, March 29, 2019 at 5:50:31 PM UTC-4, Christopher Macrander wrote:
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/fe10db77-653d-43f0-94f4-4c00fa8a3ff4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment