jono1970
asked on
aahhhhh connection error
Hi,
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
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'mypassword';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'petstore';
mysql_select_db($dbname);
?>
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
jono
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
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'mypassword';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'petstore';
mysql_select_db($dbname);
?>
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
jono
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
Well, I did not intend to hurt anybodys feelings but the answer that was given certainly did not justify the points awarded. There was certainly no desire to help me on my way. In the end I simply removed the software and reinstalled. For the points given I was at least hoping to be told how to check the permissions, etc. In my opinion it was a very poor answer, which gave me no other option than to reinstall the software.
I do not wish to offend angel so I am happy to move my grade to a B to keep him happy. Bless him.
Jono
Well, I did not intend to hurt anybodys feelings but the answer that was given certainly did not justify the points awarded. There was certainly no desire to help me on my way. In the end I simply removed the software and reinstalled. For the points given I was at least hoping to be told how to check the permissions, etc. In my opinion it was a very poor answer, which gave me no other option than to reinstall the software.
I do not wish to offend angel so I am happy to move my grade to a B to keep him happy. Bless him.
Jono
>Well, I did not intend to hurt anybodys feelings but the answer that was given certainly did not justify the points awarded.
You should have posted that. EE asks you to follow-up your questions. did you read the guidelines?
>There was certainly no desire to help me on my way.
How can you assume that? Wasn't I posting to your question? Do you know me?
>For the points given I was at least hoping to be told how to check the permissions, etc.
Well, I posted that it was quite sure a problem with security, so that means: check the permissions.
if you don't know how to check permissions, post that info and I or someone else will guide you.
>In my opinion it was a very poor answer, which gave me no other option than to reinstall the software.
Possibly reinstalling was the easiest solution in your case, but not the explanation to the problem.
you told that you checked the permissions, but you were not the first one to overlook something.
I admit that the post was quite short, but followup was definitively shorter.
>I do not wish to offend angel so I am happy to move my grade to a B to keep him happy. Bless him.
I will not get more or less happy getting grade A or C.
It's just to explain you that you were acting against EE rules (and anyhow net-ikette) to not follow-up your question.
If you think the explanation was not worth anything, request the question to be deleted, that would be more appropriate action (as explained in the ee guidelines again)
Best Regards
You should have posted that. EE asks you to follow-up your questions. did you read the guidelines?
>There was certainly no desire to help me on my way.
How can you assume that? Wasn't I posting to your question? Do you know me?
>For the points given I was at least hoping to be told how to check the permissions, etc.
Well, I posted that it was quite sure a problem with security, so that means: check the permissions.
if you don't know how to check permissions, post that info and I or someone else will guide you.
>In my opinion it was a very poor answer, which gave me no other option than to reinstall the software.
Possibly reinstalling was the easiest solution in your case, but not the explanation to the problem.
you told that you checked the permissions, but you were not the first one to overlook something.
I admit that the post was quite short, but followup was definitively shorter.
>I do not wish to offend angel so I am happy to move my grade to a B to keep him happy. Bless him.
I will not get more or less happy getting grade A or C.
It's just to explain you that you were acting against EE rules (and anyhow net-ikette) to not follow-up your question.
If you think the explanation was not worth anything, request the question to be deleted, that would be more appropriate action (as explained in the ee guidelines again)
Best Regards
you might want to review the EE guidelines about gradings:
https://www.experts-exchange.com/help.jsp#hi73
giving grade C without explanation is actually against the rules, you should at least give the expert a chance to react (ie give more help/details etc)
Note that some experts don't like to post answers if the grading history looks like yours (mostly C and B)...
Best Regards