touch db.log

在指定目录下建立log文件

set global general_log_file='/home/ss/shell/db.log';--设定log文件位置

设定log文件位置

set global general_log=on;--开启功能