diff --git a/CHANGELOG b/CHANGELOG index 70bbf42..1cdd160 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,7 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp * Check for bullseye security repository * Checks for new minifirewall configuration +* Improve MySQL utils configuration checks ### Changed diff --git a/evocheck.sh b/evocheck.sh index 57fa0f6..8912760 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -423,17 +423,20 @@ check_apachemunin() { check_mysqlutils() { MYSQL_ADMIN=${MYSQL_ADMIN:-mysqladmin} if is_installed mysql-server; then - # You can configure MYSQL_ADMIN in evocheck.cf - if ! grep -qs "$MYSQL_ADMIN" /root/.my.cnf; then - failed "IS_MYSQLUTILS" "mysqladmin missing in /root/.my.cnf" + # With Debian 11 and later, root can connect to MariaDB with the socket + if is_debian_wheezy || is_debian_jessie || is_debian_stretch || is_debian_buster; then + # You can configure MYSQL_ADMIN in evocheck.cf + if ! grep -qs "^user *= *${MYSQL_ADMIN}" /root/.my.cnf; then + failed "IS_MYSQLUTILS" "${MYSQL_ADMIN} missing in /root/.my.cnf" + fi fi if ! test -x /usr/bin/mytop; then if ! test -x /usr/local/bin/mytop; then failed "IS_MYSQLUTILS" "mytop binary missing" fi fi - if ! grep -qs debian-sys-maint /root/.mytop; then - failed "IS_MYSQLUTILS" "debian-sys-maint missing in /root/.mytop" + if ! grep -qs '^user *=' /root/.mytop; then + failed "IS_MYSQLUTILS" "credentials missing in /root/.mytop" fi fi }