IGGt
April 10, 2026, 11:25am
1
I am running the audit_log_filter component with MySQL 8.4.8 (Oracle MySQL).
If I run:
SELECT audit_log_filter_set_user(‘%’, ‘log_connections_and_queries’);
it works fine.
If I run:
SELECT audit_log_filter_set_user(‘user@localhost’, ‘log_connections_and_queries’);
it works fine.
But if I try and run:
SELECT audit_log_filter_set_user(‘user@%’, ‘log_connections_and_queries’);
I get:
Error Code: 1123. Can’t initialize function ‘audit_log_filter_set_user’; Wrong argument: bad host name format
Is there a way to add “user@%”.
I tried removing all other user entries first, using a different filter name. But it seems that it simply doesn’t like “user@%”
Try your command like this:
SELECT audit_log_filter_set_user('user@%', 'log_connections_and_queries');
Notice I changed from the ‘ ’ (smart quotes) to ’ '.
IGGt
April 10, 2026, 12:07pm
3
Still the same. I also tried “ “. No difference.
Are you running MySQL Community or Oracle MySQL Enterprise?
What is the output from this:
SELECT @@version, @@version_comment;
IGGt
April 10, 2026, 12:34pm
8
I just tried this on a test server, withe the same OS and MySQL version, and of course, it works fine on there. So it seems there is something about my setup it doesn’t like.
Old versions of the audit log filter component had a bug like this - PS-9024
IGGt
April 13, 2026, 11:00am
10
It looks like I had installed an older version of the component by mistake. I copied the working one across and installed that, and it now seems to be fine.