Check and set default db when connecting