my.cnf 파일에 아래 내용을 설정해 주면 지정된 파일에 쿼리 로그를 남길 수 있다.

 

[root@AP1 etc]#vim  my.cnf        

 

general_log = 1

slow-query-log = 1 
general_log_file = /var/log/mysql_query.log
expire_logs_days = 2
max_binlog_size = 10M

+ Recent posts