Fix remote database connection