Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am experiencing issue.

Someone 'attacked' my server: simply by searching the same phrase with multiple requests.

As it is text search request and database indices are not used, the engine searches through every row. In general I will deal with myisam full-text indices, but I am curious, is there any way to block/disconnect/interrupt the query which is longer than x seconds?

P.S. I have wait_timeout set to 30, is there anything else I can set(I don't think interactive timeout will be useful).

share|improve this question
Thank you guys for all your question. I'v ended up with following answer: serverfault.com/a/401830/129360 – Jevgeni Smirnov Feb 27 at 10:41

migrated from superuser.com Feb 27 at 7:40

1 Answer

Thinking a bit outside the box, you may be able to log query times and use FAIL2BAN to parse the log file and perform an action (like block the IP address, although that will only help prevent future queries)

share|improve this answer
this is not the best option. I am interested is there any kind of 'timeout' I can set? – Jevgeni Smirnov Feb 27 at 8:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.