Fix connection to use specified db number