Obviously have to pass the hostname as is when there is no ':' in the hostname

When there is no colon in the database hostname, we currently do not pass the hostname on.

Fixes #9066
Regression from #9018
Reverts 73062040e68212ac6e92d36211ca0bef91777589