Extract db url connection logic to class
Merge pull request #13535 from schneems/schneems/extract-url-logic

Extract db url connection logic to class