mac 开启mysql日志

step1: 进入终端进入mysql:

step2 : 开启mysql日志

set global general_log=on;

step3 : 查看mysql的日志文件所在位置

show varibles like 'general_log_file';

step4 : 在终端中用tail -f 命令打开该日志文件:

sudo tail -f  /路径…………

原文地址:https://www.cnblogs.com/Leon27-29/p/12201437.html