Mysql open log monitoring

1, see specific file location monitoring and logging of log files:

show global variables like '%general%';

 

 2, open the monitor:

set global general_log = ON;
  can also set the location to save the log: the SET, Ltd. Free Join general_log_file = 'tmp / general.lg'; 
  view the log save location: Show the Variables like 'general_log_file'; 
3, set the log time
I log in query time found time and system time is inconsistent;
view the system default time parameters: the SELECT @@ log_timestamps;

 

Set the time using the system: SET log_timestamps = Global System;

View now log time:

 

Guess you like

Origin www.cnblogs.com/Ternura-1023/p/11592173.html