Home > Database > Mysql Tutorial > mysql:打开通用查询和慢查询_MySQL

mysql:打开通用查询和慢查询_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 14:01:42
Original
988 people have browsed it

 打开通用查询日志:记录所有查询日志.该日志路经默认在/var/lib/mysql下.名字默认为"机器名.log"

  vi /etc/my.cnf

  [mysqld]

  ...

  log

  ...

  打开慢查询日志: 记录所有慢查询日志(该例阀门为2秒).

  vi /etc/my.cnf

  [mysqld]

  ...

  log-slow-queries = /var/log/mysqlslowquery.log

  long_query_time = 2

  .....

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