When installing CRM 4.0 you have the option to connect to an existing deployment. This option is for adding new CRM 4.0 servers to an existing deployment and not for connecting to an existing database following a server or domain migration.
For an existing database that has been moved to a new domain, use a new installation, create a new (temporary) organization. Then use Deployment Manager to import the existing database and then delete the temporary organization.