Skip to content

Query Logging ignore the rules set at mysql_query_rules; #3971

Open
@SteveZhengMe

Description

@SteveZhengMe

Hi team,
I am running proxysql_2.2.0-ubuntu20_arm64. I set the query logging as follow:

  • SET mysql-eventslog_filename='db_audit.log';
  • SET mysql-eventslog_filesize=1048576000;
  • SET mysql-eventslog_format=2;
  • SET mysql-eventslog_default_log=1
  • LOAD MYSQL VARIABLES TO RUNTIME;
  • SAVE MYSQL VARIABLES TO DISK;

I set log=0 to all my rules, but the db_audit.log.000001 is growing and I can see all the queries are logged.

Then I added a rules:
INSERT INTO mysql_query_rules (rule_id, active, match_digest, log, apply) VALUES (1, 1, 'INSERT into ', 1, 0);

Now, in the mysql_query_rules,

rule_id digest match_digest log apply
1 NULL insert into 1 0
11 NULL ^SELECT.*FOR UPDATE$ 0 1
101 XXXXXX NULL 0 1
102 XXXXXX NULL 0 1
103 ... ... NULL 0 1

I suppose the query log only has the "insert " statements, but it still logs all the queries.

It seems to ignore the query rules.

Is there anything I missed?

Thank you :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions