Found the cause.. just fixed it by changing the dbtype to mysqli in the mdl_config_plugins table for database_enrolment type
mdl_config_plugins and enrol_database : dbtype change the (Value) to mysqli
purge your cache (just in case)
and restart your db services