Is there an option to turn existing global variant to constant in MySQL or MariaDB? I'm trying to prevent changing some global variables which I set from the ini file.

For example:

server_audit_logging=ON


I want to prevent it from changing by:

SET GLOBAL server_audit_logging = OFF;


Is there a way to achieve it?
Which values are you concerned about?


Some are GLOBAL only.  my.ini and a restart is needed to change them from outside.  Or a user with SUPER can change them from a connection.
Some are SESSION, but initialized to the corresponding GLOBAL when you connected.  You can override these with SET SESSION ....  Once you have done that, no one else can change them until you disconnect.


If you are having trouble with a user, that is a personnel problem.  Don't give him SUPER.