MySQL Log of invalid Queries

前端 未结 5 2064
一生所求
一生所求 2021-02-05 05:25

I AM NOT RUNNING THE COMMANDS FROM PHP!

I have MySQL log_error value set to /var/log/mysql/error.log

However when I connect to a database and run an SQL command,

5条回答
  •  南方客
    南方客 (楼主)
    2021-02-05 06:08

    As of mysql version 5.6.3 (released 2011-10-03), there is a variable called log-raw which allows you to include invalid queries in the general query log:

    https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_log-raw

    You will need to turn on general query log using general-log and general-log-file, e.g.:

    [mysqld]
    general-log=1
    log-raw=1
    general-log-file=/var/log/mysql/general.log
    

提交回复
热议问题