added database port check depending on hostname