Read from mysql.slow_log; inconsistent application of SUPER privileges

14 views
Skip to first unread message

Christopher Macrander

unread,
Mar 29, 2019, 5:50:31 PM3/29/19
to Google Cloud SQL discuss
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?

Nicolas (Google Cloud Platform Support)

unread,
Apr 8, 2019, 8:02:19 PM4/8/19
to Google Cloud SQL discuss

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!


Reply all
Reply to author
Forward
0 new messages