Hello John,
Sorry for the delay i had to reproduce the problem.
to get it to work i added a custom decoder in /var/ossec/etc/decoders/local_decoder.xml in wazuh-manager
<decoder name="custom_mysql">
<prematch>\d+\s\w+\s+</prematch>
<regex>\s+(\d+)\s(\w+)\s+(\w\.*)</regex>
<order>code, _action, command</order>
</decoder>
i also created a rule in /var/ossec/etc/rules/local_rules.xml
<group name="mysql,">
<rule id="100150" level="3">
<decoded_as>custom_mysql</decoded_as>
<field name="_action">Query</field>
<description>The following query '$(command)' was run</description>
</rule>
</group>
that is all, multi-line queries will be logged in wazuh.
Please note that you cannot test multi-line queries with the log test binary /var/ossec/bin/wazuh-logtest as each line will be treated as a separate terminal command, resulting in broken, missing or incomplete commands as you are experiencing. to properly test the multi-line logging you should use a proper SQL terminal or interface.
Regards.