Enable database port override.  Still should use some refactoring, as
this isn't the most elegant way to do it.