@tara: I am configuring site with fresh copy, and you know that with fresh copy of WordPress wp-config.php file doesn’t exists, on the root directory, after configuring WordPress creates it with given details from Wizard.
in my case wp-config.php file does not exists because I am configuring it first time, it’s giving me “Error establishing a database connection” instead of WordPress Installation Wizard.
if it’s database or sever issue then why it’s working fine with manually created (wp-config.php) file.
@vicky_8882002 : I am trying to setup WordPress on my localhost environment not any server/hosting