Prevent remote DB connections during init and upgrade - EUCA-9985

Connections to the local database now use localhost. When initializing
or upgrading the database only localhost connections are permitted.

EUCA-9985
Merge remote-tracking branch 'origin/dev/sjones/EUCA-9985' into testing