Welcome Guest, Not a member yet? Register   Sign In
Unable to connect to your database server using the provided settings.
#11

[eluser]BrianDHall[/eluser]
To isolate, just code a simple test mysql connection script in pure php that all it does is use your configuration settings and attempt to connect to database. Then the only theoretically possible problem is either an issue of not having the right settings, or something wrong with your mysql or php configuration which only your host could likely correct.
#12

[eluser]John_Betong[/eluser]
[quote author="BrianDHall" date="1255719714"]To isolate, just code a simple test mysql connection script in pure php that all it does is use your configuration settings and attempt to connect to database. Then the only theoretically possible problem is either an issue of not having the right settings, or something wrong with your mysql or php configuration which only your host could likely correct.[/quote]
 
Here we go - try pasting this at the end of ./config/database.php:
Code:
// TRY TO LOGIN WITH SIMPLE PHP NATIVE SCRIPT
$link = mysql_connect
  (
    $db['default']['hostname'],
    $db['default']['username'],
    $db['default']['password']
  );

if (!$link) {
  die('Not connected : ' . mysql_error());
}


// check the current db
$db_selected = mysql_select_db($db['default']['database'], $link);
if (!$db_selected) {
  die ('Can\'t use <b>' .$db['default']['database'] .'</b> : ' . mysql_error());
}
&nbsp;
Also if you have created the database, username and password then with cPanel and another couple of MYSQL Managment programs I have used all supply PHP login script. I usually cut and paste the script into databae.php.
&nbsp;
You have my sympathy because I have been frustrated with slow connections and having to change the administration settings on numerous databases.
&nbsp;
&nbsp;
#13

[eluser]jayapalchandran[/eluser]
i had the same problem and i found that mysql_pconnect has been disabled by the hosting company. so i had been getting access denied like the question-er




Theme © iAndrew 2016 - Forum software by © MyBB