A Database Error Occurred

Unable to connect to your database server using the provided settings.

the above error am getting when i load the localhost and my database.php and db_driver codings are given below

$db['default']['hostname'] = "etc.com";
 $db['default']['username'] = "etc"; 
 $db['default']['password'] = "etc@etc";
 $db['default']['database'] = "visiting_link";
 $db['default']['dbdriver'] = "mysql";
 $db['default']['dbprefix'] = "";
 $db['default']['pconnect'] = TRUE;
 $db['default']['db_debug'] = TRUE;
 $db['default']['cache_on'] = FALSE;
 $db['default']['cachedir'] = "";
 $db['default']['char_set'] = "utf8";
 $db['default']['dbcollat'] = "utf8_general_ci";