MariaDB Strict Mode for single cPanel Account
Hello.
Is it possible to disable mysql strict mode for a single cPanel account and not globally on the entire server? I have a single account where the site owner is complaining that STRICT_MODE is causing issues with their application. My response is that the developer of their app should check their code and figure out where the issue is and fix it, rather than make a global change to my server where the other 300 databases have no issues whatsoever.
Any other thoughts on my stance on this are welcome as well...
To try and make this work, I've tried setting up a .my.cnf file in the root of the account in question. This doesn't seem to do anything.
I'm using WHM 84.0.20 on CENTOS 7.7 and MariaDB 10.3.
Thanks.
Howard
-
Howard The .my.cnf file would only apply to MySQL client connections made from the command line. However, you can set the sql_mode on a per-session basis. SET SESSION sql_mode = 'modes';
Where 'modes' is the desired SQL mode. The application would need to run the above SQL query before other queries. If modifying the application is not possible, I do not know of another way to selectively disable the sql mode on a per-user basis. I find the MySQL docs do a better job of explaining modes than MariaDB's.0 -
Thanks @rackaid! @HowardE let us know if you need any further assistance. 0 -
I'll pass this on to the app developer... Hopefully this works for him. 0
Please sign in to leave a comment.
Comments
3 comments