[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());
}
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.
You have my sympathy because I have been frustrated with slow connections and having to change the administration settings on numerous databases.