I\'m looking for a way to limit the max running time of a query on mysql server. I figured this could be done through the my.cnf configuration file, but couldn\
You could use a query as follows:
SELECT MAX_STATEMENT_TIME=1000 * FROM table;
UPDATE:
You should use max_execution_time instead.
SELECT /*+ MAX_EXECUTION_TIME(1000)*/ * FROM table;
MAX_STATEMENT_TIME was renamed to max_execution_time in MySQL 5.7.8. http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_execution_time