MariaDB max_statement_time
I determined how to have MariaDB automatically terminate long running SQL queries by modifying the Windows Registry for my MariaDB service:
"C:\MariaDB\bin\mysqld.exe" "--defaults-file=C:\MariaDB\data\my.ini" "--max_statement_time=4" "MariaDB"
Now, how can I set a four second limit for queries run by MariaDB via cPanel please?
-
Hey there! Are you not able to add this to the main /etc/my.cnf and then restart the MariaDB service?
0 -
It only worked on Windows as part of the command line, I couldn't determine how to get it working from the configuration file and the documentation is completely lacking on the configuration file. I trust configuration files because they last, Windows installs, not so much. I'm not a Linux administrator hence why I'm asking here.
0 -
You would want to open /etc/my.cnf with a text editor and add the following line:
max_statement_time=##
where the "##" is the seconds you want the value configured for. Then you'd restart the database service with this command:
/scripts/restartsrv_mysql
and the value should be live at that point. Let me know how it goes!
0
Please sign in to leave a comment.
Comments
3 comments