Setting SQL mode doesn't take effect

Issue Summary

I’m trying to set the SQL mode to be compatible with WordPress:

sql_mode=NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

I could only find two my.cnf files and editing either of them doesn’t take effect.
There’s this - Local/lightning-services/mysql-5.7.28+4/conf/my.cnf.hbs - the changes I make here persists during stoping/starting the site.

And there’s this - Local/run/YBpi-cZQF/conf/mysql/my.cnf - the changes I make here are being removed whenever I stop/start the site.

Are there any other files I’m missing which I can edit?

System Details

  • Which version of Local is being used?
    5.9.4.

  • What Operating System (OS) and OS version is being used?
    macOS Catalina

I did find a workaround for anyone facing this. I just run this in TablePlus every time the server reboots:

SET SESSION sql_mode=('NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION');

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.