To enable MySQL logging...
We can enable logging in the cnf file as below;
[mysqld]
log = /var/log/mysqld.log
log-error = /var/log/mysqld.error.log
We can enable during run time by logging into the MySQL server and executing either of the below;
To use the mysql.general_log table, do;
SET GLOBAL log_output = "TABLE";
SET GLOBAL general_log = 'ON';
To use file logging, do;
SET GLOBAL log_output = 'FILE';
SET GLOBAL general_log_file = "/path_to_logfile/mysql.log";
SET GLOBAL general_log = 'ON';
To disable, do;
SET GLOBAL general_log = 0;
No comments:
Post a Comment
Note: only a member of this blog may post a comment.