mysql5.5 开启慢查询日志

1. mysql 5.5 可能和别的版本的在my.ini配置中的关键字可能不同


2.如何发现关键字
mysql> show variables like '%log%';


结果:

| log_slow_queries                        ON

| slow_query_log                           ON
| slow_query_log_file                     C:\ProgramData\MySQL\MySQL Server 5.5\Data\Macrotea-PC-slow.log


3.修改 my.ini

[mysqld]

log_slow_queries=ON
long_query_time=2
slow_query_log=ON
log_queries_not_using_indexes=ON
slow_query_log_file=E:/Application/Category/Java/_ISCAS/SIE/slow-query.log

# The TCP/IP Port the MySQL Server will listen on
port=3306


猜你喜欢

转载自zaq369cde.iteye.com/blog/1906564