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

[eluser]Unknown[/eluser]
I'm just starting to work on a project so as to integrate the payment system. So I did not set this up in the beginning..

I'm running this local in Eclipse PDT (Kepler) using the latest Zend server. The whole error is:

Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
Line Number: 346

Configuration
--------------
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'userhere';
$db['default']['password'] = 'passwordhere';
$db['default']['database'] = 'dbnamehere';
$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';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;

System: MacBook Pro, 10.8.5

What I have done:

1) I imported the db via phpMyAdmin and can navigate the local database.
2) I created two scripts testing the connection for both mysql and mysqli using the exact same credentials.

Code:
$connection = mysql_connect('localhost', 'username', 'password');
if (!$connection) {
echo 'Not connected : ' . mysql_error();
}

$db_selected = mysql_select_db('databasename', $connection);

if (!$db_selected) {
echo 'Error connecting : ' . mysql_error()';
} else {
echo 'Success.... Connected......';
}

and...

Code:
$mysqli_connection = new MySQLi('localhost', 'username', 'password', 'databasename');

if ($mysqli_connection->connect_error) {
echo "Not connected, error: " . $mysqli_connection->connect_error;
} else {
echo "Connected.";
}

... both returned "Connected..."

3) I have spent the last hour reading posts here and cross checking every suggested possibility. Even cut and pasted credentials from above scripts to config.
4) I have reviewed the docs on Database Config and any related docs..

No joy...

I'm tapped on this for the moment and need some fresh ideas.. OR... I'm really missing something....

Thanks!!!!


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



Theme © iAndrew 2016 - Forum software by © MyBB