Disconnect existing database connections before creating new ones