본문 바로가기

Database/MySQL

Mysql 실행되는 로그 파일로 남기기

mysql> set global general_log=on;
Query OK, 0 rows affected (0.00 sec)

mysql> set global log_output='file';
Query OK, 0 rows affected (0.00 sec)

mysql> set global general_log_file='/home/bos/mysql/data/general_log.log';
Query OK, 0 rows affected (0.01 sec)

mysql>