windows中设置mysql日志输出路径的方法

来源:互联网 发布:有趣的app软件 编辑:程序博客网 时间:2024/05/18 16:15

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记录;


0 0