Reputation: 149
Does restarting the MySQL service on Linux, disables the already enabled general query logging?
There was a log file getting generated inside the data folder, and it was growing exponentially. The db has 100 requests per minute.
Initially i guessed, some transaction had broken in between, that made the logs to swell. So i restarted the service, which stopped adding to that log file.
I checked the global variables and got to know the path was assigned for general_log_file. But now it was showing 'OFF'.
Hence my query
Upvotes: 1
Views: 224
Reputation: 53830
It's a common issue that people will set configuration of MySQL through dynamic (global) variables and forget to set the variables in the options file (my.conf). In that case, when the server is restarted, MySQL will revert to default settings.
The default setting for general_log
is OFF
. To immediately enable the general query log, set the global variable to ON
. Then set the value for general-log
in your my.conf
file to ensure that the setting is applied whenever you restart MySQL server.
Upvotes: 2
Reputation: 34145
MySQL will start with whatever options are in the file configuration. If you switched any of the global server variables before, they will be reverted to what is set in the file.
Upvotes: 0
Reputation: 18439
No, Restarting the server doesn't make the binary logs to OFF...
It may be the case that you changed the configuration file before and now restart takes that file...
Upvotes: 0