1
marcilgen
Install problem: could not connect to the database server
  • 2006/2/13 4:46

  • marcilgen

  • Just popping in

  • Posts: 1

  • Since: 2006/2/13


I'm trying to install XOOPS on my local machine for testing. Here are my specs:
OS: Windows 2000
URL: http://localhost
Web server: Apache 1.3
PHP: 4.4.2
MySql 4.1.13
XOOPS 2.2.3
I run through the install and everything is OK until I get to the error message "Could not connect to the database server."
I have manually checked my mySQL implementation, logged in with the username and password, and everything is just fine.

What could possibly be the problem?

I do not use CPanel - instead I use command line interaction to work with mySQL.

Any ideas?

2
Stewdio
Re: Install problem: could not connect to the database server
  • 2006/2/13 6:14

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


The error reported at that point of the installation is rather cryptic and somewhat misleading. Even a mistyped password will produce the same error. It connects, but doesn't report the correct error.

Be that as it may, create a specific user account in MySQL for your XOOPS install and use that account to be absolutly sure. Also create a separate XOOPS DB and assign that user account to that db, of course with all the proper privledges.

I'm sure you aware of all this, but I have found that when I get right down to specifics with all my XOOPS instalations, I can be sure that I eliminate any potential slip-ups with a misconfiguration or what have you.

On a side note, I spent three days trying fix one XOOPS instalation because I used my DB prefix in the password field! Yes, it can happen to the best of us
XOOPS Community Support

3
blackfossil
Re: Install problem: could not connect to the database server

try create a file named db.php at your localhost and run it in browser to try out your db connection,the code are as follows. If problems exists, it will show the MySQL error message and at least you have an idea on what's getting wrong.
// connect to the server:
$cn = mysql_connect("localhost","username","pass");
// run a simple query
$sql = "SELECT 'done' as my_field LIMIT 1";
$result = mysql_query($sql,$cn);
if($result)
{
// if it worked, print the result to screen
echo mysql_result($result,"my_field");
} else {
// otherwise, either the server isn't running
// or the username/password are wrong
echo mysql_error()."
You should see an error message above you?";
}
?>

4
ddewilt
Re: Install problem: could not connect to the database server
  • 2006/2/14 8:31

  • ddewilt

  • Just popping in

  • Posts: 14

  • Since: 2006/2/4 1


hmmm smart thinkin'

Login

Who's Online

351 user(s) are online (261 user(s) are browsing Support Forums)


Members: 0


Guests: 351


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits