Categories
amazon-web-services mysql relational-database

Set Timeout for All Select queries in MySQL running on RDS

I want to set a timeout for all the select queries hitting on MySQL Server.
So that if the read query is taking a long time then i can throw a timeout exception.
I know this feature is provided in MySQL 5.7 by:

SET GLOBAL MAX_STATEMENT_TIME=1000;

or

SET GLOBAL MAX_EXECUTION_TIME=1000;

But the problem is that MySQL 5.7 is not provided in AWS RDS. I am using MySQL 5.6 on RDS. Please tell me is there any alternate way to do this in 5.6
I am a new to mysql and RDS. Please help me out.