Home > Database > Mysql Tutorial > mysql日志的使用命令_MySQL

mysql日志的使用命令_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:35:10
Original
942 people have browsed it

bitsCN.com

mysql日志的使用命令

 

mysql有以下几种日志: 

错误日志: -log-err 

查询日志: -log 

慢查询日志: -log-slow-queries 

更新日志: -log-update 

二进制日志: -log-bin 

 

在mysql的安装目录下,打开my.ini,在后面加上上面的参数,保存后重启mysql服务就行了。 

例如: 

#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= 

 

上面只开启了错误日志,要开其他的日志就把前面的“#”去掉 

 

查看命令: 

 

①show variables like 'log_%';查看所有的log命令 

 

②show variables like 'log_bin';查看具体的log命令

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template