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

[eluser]Unknown[/eluser]
Found the problem...

As a newbie I had made the assumption that the "database.php" file that needed updating with new credentials was ../system/core/database.php

Apparently not..

I added this code:

Code:
echo '<pre>';
  print_r($db['default']);
  echo '</pre>';
  
  echo 'Connecting to database: ' .$db['default']['database'];
  $dbh=mysql_connect
  (
    $db['default']['hostname'],
    $db['default']['username'],
    $db['default']['password'])
    or die('Cannot connect to the database because: ' . mysql_error());
  mysql_select_db ($db['default']['database']);
  
  echo '<br />   Connected OK:'  ;
  die( 'file: ' .__FILE__ . ' Line: ' .__LINE__);

in the ../system/database/DB.php on line 59, and discovered that my new settings were not being picked up.. So I did a file search and found that "other" location..

../application/config/database.php

and all is working..


Messages In This Thread
Unable to connect to your database server using the provided settings. - by El Forum - 08-22-2014, 05:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB