MySQL 记录所有执行了的 sql 语句
方法
- 查看日志是否打开
show variables where Variable_name="general_log"; - 若结果为
OFF,则运行set global general_log=on; - 查看日志记录位置
show variables where Variable_name="general_log_file";
注意事项
- 会记录所有sql,建议只在调试时打开,调试完成后关闭
set global general_log=off;
本作品采用《CC 协议》,转载必须注明作者和本文链接
关于 LearnKu
推荐文章: