Try connection with specified db when postgres does not work

original initiated by @eMerzh in #870 - rebased and tested with current code (little change because a translation for the exception was introduced)
**SAME AS #867 but for master**

Hi,
here is my attempt to fix #675
the thing is basicaly that we try to connect to 'postgres' db wich is a "protected" db...
from local there is no trouble but from a remote location the postgres db is often no accessible...
so the install fail...

here i change small things to connect to the specified db if the postgres fail

:)