diff --git a/check_mysqlserver b/check_mysqlserver
index de7b3b943d601e8fda789ba3fba33b453a4ed374..a4217bbdd3f65c206f9a8613e9a46c0dd6c92c9b 100755
--- a/check_mysqlserver
+++ b/check_mysqlserver
@@ -242,10 +242,10 @@ fi
 
 
 # --- check installation
-grep $myuser $cfgfile >/dev/null 2>/dev/null 
-if [ $? -ne 0 ]; then
+if ! grep $myuser $cfgfile >/dev/null 2>&1; then
     ph.abort "MYSQL access not possible yet. You need to install the monitoring user first: as root execute $(basename $0) -i"
 fi
+. "${cfgfile}"
 
 # ----------------------------------------------------------------------