Disable general MySQL registration without restarting?

Is it possible to completely disable the general log without restarting the server?

Because in the documentation:

SET sql_log_bin = {0|1}

Disables or enables the binary log for the current connection ( sql_log_bin- this is a session variable) if the client has privilege SUPER. An application is rejected with an error if the client does not have this privilege.

Is it possible to enable / disable shared log without rebooting MySQL?

+3
source share
2 answers

For those who use 5.1 now, you can use these commands (you had to look for them, and this Q & A appeared)

SET GLOBAL log_output='TABLE'; #or FILE

SET GLOBAL general_log='OFF'; #or ON

SET GLOBAL slow_query_log='ON'; #or OFF

TABLE mysql.general_log mysql.slow_log , .

+10

MySQL 5.0 " sql_log_off ​​ ON OFF, ". [MySQL Doc, ]

0

Source: https://habr.com/ru/post/1716309/


All Articles