I’m running Local by Flywheel on a Windows 10 computer. I need access to the MySQL general log file. I can enable the log file and give it a location using the
set global general_log = 1; and
set global general_log_file = “/var/log/mysql/general_log.log”;
statements, but that would have to be done each time I restart Local by Flywheel on my computer.
I would prefer to just modify the MySQL configuration file so that the log files are enabled whenever MySQL starts. Where do I find the MySQL configuration file (my.ini, for example) in Local by Flywheel?
I created a class which is included when WP_DEBUG == True, which automatically enables the general_log when a particular defined constant is set to true in the wp-config.php file or disables it when the constant is set to false (and doesn’t make any changes to it if the constant does not exist). That was my workaround to this problem.
But yesterday, quite by accident, I discovered the MySQL Configuration file ‘my.cnf’ in the LOCAL site’s ‘conf/mysql/’ folder. Making changes to that file and restarting the LOCAL site, solves my problem.
However, my debug class is much handier to use, so I will probably just continue to use that.
Awesome, glad to hear you sorted it out!
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.