3

Is there a way to set a SELECT timeout for a specific mysql user? The following question address this for any user on a database -- How to set a maximum execution time for a mysql query? -- but I want to set it only for a specific mysql user, the user given below.

Id  User    Host            db  Command Time    State                 Info
97  tvs0XXX ec2...com:47703 ax  Query   55      Creating sort index   SELECT...
Community
  • 1
  • 1
David542
  • 104,438
  • 178
  • 489
  • 842
  • 1
    possible duplicate? http://stackoverflow.com/questions/243644/how-to-setup-a-connection-timeout-depending-of-the-user-login-in-mysql – Zak Jul 27 '16 at 20:51

1 Answers1

1

You can define this using max_execution_time session variable (in milliseconds), something like:

SET SESSION max_execution_time=2000;

It should be done from a client for each session, so there is no way (currently) to assign this for a specific database user.

Alexey Shokov
  • 4,775
  • 1
  • 21
  • 22