At the moment, I have a wordpress-based site at http://sub.mydomain.com, running for 2 years already.
Now I decided to setup another wordpress site, to be used separately from http://sub.mydomain.com, at http://www.mydomain.com.
My question is would the new setup causes any damage to the site in sub domain? If yes, Could you guide me how to avoid it?
No, they should exist in seperate space on the server’s file system so it should be fine. Seperate databases, seperate urls, etc.
edit:
our dev server has dev1.oursite.com, dev2.oursite.com etc on it. Multiple subdomains running wordpress, magento, and drupal with no problems.
markratledge is correct you can install it to the same database with a different prefix, but there is no real benefit to doing so unless your host has limited the number of databases you can have, or you only want one DB to backup. But either method is fine, no conflicts.