How to enable MySQL Query Log?

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

    I had to drop and recreate the general log at one point. During the recreation, character sets got messed up and I ended up having this error in the logs:

    [ERROR] Incorrect definition of table mysql.general_log: expected the type of column 'user_host' at position 1 to have character set 'utf8' but found character set 'latin1'

    So if the standard answer of "check to make sure logging is on" doesn't work for you, check to make sure your fields have the right character set.

提交回复
热议问题