Check for mysql host.err, in addition to for bfm scanning

Version 1.532


Relating to: The internal DA default is to use something like: brute_force_mysql_log=/var/lib/mysql/ (path varies per OS) but the default for log-error on some versions of MySQL/MariaDB is: /var/lib/mysql/host.err where the short form is used. If brute_force_mysql_log is added to your directadmin.conf, this overrides everything and uses whatever you set. As before the |HOSTNAME| variable can be used, which inserts the "servername=" value from the directadmin.conf into the value. ==== Fix: If the default internal brute_force_mysql_log is used, then the timestamps for both and host.err will be checked. If one does not exist, then the timestamp will be 0... The largest timestamp seen will be used as the log to parse. ==== Note, some MySQL/MariaDB versions require the blank entry to be added to the /etc/my.cnf in the [mysqld] section, eg: log-error= without any value, and this forces the default, to be logged to, eg: /var/lib/mysql/host.err ==== This fix is mainly only added to allow for a static /etc/my.cnf used across many different boxes, but to still use a dynamic err file... and such that DA will pick up the variable name for parsing.

Interested to try DirectAdmin? Get a 30-day Free Trial!