直接在my.ini最后加上
#Enter a name for the binary log. Otherwise a default name will be used. #log-bin= #Enter a name for the query log file. Otherwise a default name will be used. #log= #Enter a name for the error log file. Otherwise a default name will be used. #log-error= #Enter a name for the update log file. Otherwise a default name will be used. #log-update=
将你需要开启的日志类型前面#去掉并加上文件名,如我要开启log 日志只需
log=E:/phpworks/mysql/logs/mysql.log
之后记得重启mysql服务,
windows下重启方法,在命令行输入:
net stop mysql net start mysql