aahhhhh connection error
Posted on 2006-06-12
I need to move my moodle installation to a new server. I have backed up the DB and restored it successfully into my new DB. I am running the same versions of PHP 4.3.11, apache 1.3.31 and mysql 4.1.19.
when i launch the site I get the following error:
Error: Database connection failed.
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php
I have checked the credentials and they are fine.
I can view PHPinfo ok
I can connect to and from the DB in cli and MYSQL-Front
I tried the following code to test and still it refuses to connect
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'mypassword';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'petstore';
How do I know if I have the mysql extension?
please can sombody help me to trouble-shoot this as I have spent the last 3 hrs browsing the net for answers but to no avail.
thanks in advance