1.找到 D:\MySQL\my.ini 文件。
2.打开此文件,找到[mysqld]行,在此行下加入如下代码:
# Log to file
log=mySQL.log
最终效果:
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
port=3306
# Log to file
log=mySQL.log
#Path to installation directory. All paths are usually resolved relative to this.
basedir="D:/MySQL/"
3.重启mysql服务,重启项目,项目中运行了sql后,会在D:\MySQL\data生成文件mySQL.log,里面就是sql记录;