How to enable MySQL Query Log?

后端 未结 14 1682
渐次进展
渐次进展 2020-11-22 09:38

How do I enable the MySQL function that logs each SQL query statement received from clients and the time that query statement has submitted? Can I do that in phpmyadmin or N

14条回答
  •  天命终不由人
    2020-11-22 10:03

    for mysql>=5.5 only for slow queries (1 second and more) my.cfg

    [mysqld]
    slow-query-log = 1
    slow-query-log-file = /var/log/mysql/mysql-slow.log
    long_query_time = 1
    log-queries-not-using-indexes
    

提交回复
热议问题