cmd_db_connect: Expand path to database config

Do not only check whether the expanded path for the database config file
exists, but also use it.
Land #2352 - Expand path to database config