[Database] Weakened check for database access

Now retries after failing to make it less error-prone. Before, it could likely happen that the MySQL-Service did not respond to database access because it was loading or whatever. This caused the AlarmWorkflow-Service to stop executing and resulted in an unreliable state. The new version retries each second until the connection becomes available.