I have a site www.domain.com with Wordpress installed. I need to create a subdomain for testing a new theme and have it linked to the main site's database. I have manually added the Wordpress files into the subdomain and during the install in the browser I added the database info of the main site. However when I then try to complete the installation it tells me that I already have Wordpress installed and directs me to log into the main site. When I do so there is no option to view the subdomain.
How do I link the subdomain to the main site's database and have them work independently?