How to enable MySQL Query Log?

后端 未结 14 1601
渐次进展
渐次进展 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:06

    I also wanted to enable the MySQL log file to see the queries and I have resolved this with the below instructions

    1. Go to /etc/mysql/mysql.conf.d
    2. open the mysqld.cnf

    and enable the below lines

    general_log_file        = /var/log/mysql/mysql.log
    general_log             = 1
    
    1. restart the MySQL with this command /etc/init.d/mysql restart
    2. go to /var/log/mysql/ and check the logs

提交回复
热议问题