The logic previously only worked on fresh installs of MariadB.
If the database configuration was lost, or a user was deleted, there was
nothing to reconcile it back to a healthy state.
The logic now checks each individual step to ensure that every assumption
has been placed correctly.