1
snake1k
Cannot Connect to Database Please Help!!!!! (hasn't been answered yet!)
  • 2005/12/15 1:08

  • snake1k

  • Just popping in

  • Posts: 3

  • Since: 2005/12/14


WHAT I'M USING:
Apache version 1.3.33 (Unix)
PHP version 4.3.10
MySQL version 4.0.25-standard
cPanel Build 10.8.1-CURRENT 60


I run the installation, verify paths etc through the installer and everything is green light up until the "check database" step. I get the following error:
Could not connect to the database server.
Please check the database server and its configuration.
I am on a shared hosting plan so no, I didn't install Mysql, it and PHPMyadmin are already provided/installed by host. PHP and MySQL are up to date versions, so no problem with that.

I've created my database according to instrcutions provided in the "Xoops for Dummies" tutorial. According to installation all the paths, login info are configured properly. So what could be the problem and the solution (in as plain english as possible please).

As a result of not being able to complete the install,when I surf back to my domain URL it reads:
This page cannot be displayed due to an internal error.

If you are the administrator of this site, please visit the XOOPS Troubleshooting Page for assistance.

Helpful infomation you should provide while asking for assistance:

Error [Xoops]: Unable to connect to database in file class/database/databasefactory.php line 34


I've read the many threads on this topic, and NO ONE seems to have a solution. At this point, I cannot honestly believe that XOOPS is ready for the world. Joomla is looking more and more appealing. XOOPS just has too many problems and apparently a total lack of support from anyone.

2
janadee
Re: Cannot Connect to Database Please Help!!!!! (hasnt been answered yet!)
  • 2005/12/16 0:56

  • janadee

  • Just popping in

  • Posts: 2

  • Since: 2005/12/15


Hey there - there is actually a thread on that in the installations part of the forum. However - I ran into this problem today and was able to solve it - its not an XOOPS issue but a server side/database issue. I have cpanel to manage websites - on cpanel go to mySQL databases. Create new database. Create new user and password. THEN - add user to database. Also for some reason when I created the database i called it xoops, but the system renamed it mylogin_xoops and the same with the user name.

Hope that helps.

3
snake1k
Re: Cannot Connect to Database Please Help!!!!! (hasnt been answered yet!)
  • 2005/12/16 1:04

  • snake1k

  • Just popping in

  • Posts: 3

  • Since: 2005/12/14


thanks for the reply but it doesn't help. You never mention what you did to fix the problem that you say is server side related. I used cpanel to create the database and the authorized user. What next? The threads on this subject DO NOT answer this problem at all.
Where are the folks in the know. Why create something that you can't even install.

4
gestroud
Re: Cannot Connect to Database Please Help!!!!! (hasnt been answered yet!)
  • 2005/12/16 1:37

  • gestroud

  • Home away from home

  • Posts: 1538

  • Since: 2004/12/22


I had the same problem that you did. This is weird and I don't know why it worked, but it did.

On some sites, I had to enter my database prefix:

// Database Username
// Your database user account on the host
define('XOOPS_DB_USER', 'prefix_username');

// Database Password
// Password for your database user account
define('XOOPS_DB_PASS', 'mypassword');

// Database Name
// The name of database on the host. The installer will attempt to create the database if not exist
define('XOOPS_DB_NAME', 'prefix_databasename');


BUT

on other ones, I didn't need the prefix. What I suggest is trying different combinations in the database and username fields. It will work - why I don't know.

5
LazyBadger
Re: Cannot Connect to Database Please Help!!!!! (hasnt been answered yet!)

Quote:

snake1k wrote:
Why create something that you can't even install.

I - can!
If somrthing doesn't work in your hand - check your hand...
Try to connect to server by hand, or by phpmyadmin...
Ask, at last, hoster tech-support: "Why I can't connect to my database"
Quis custodiet ipsos custodes?

Webmaster of
XOOPS2.RU
XOOPS Modules Proving Ground
XOOPS Themes Exhibition

6
janadee
Re: Cannot Connect to Database Please Help!!!!! (hasnt been answered yet!)
  • 2005/12/16 16:26

  • janadee

  • Just popping in

  • Posts: 2

  • Since: 2005/12/15


Okay - I guess I didn't explain specifically enough. Its not a problem with xoops. Its how you set up your database. For some reason, in the c-panel when you add a database through mySQL databases, the system adds your login to the beginning of the name. So if you called your database XOOPS and your log in to the cpanel is snake1 then the database is named snake1_xoops. Not only that, it does the same thing with the user name - so if your user is snake1 then the actual user name is snake1_snake1 - get it?? AND - this is important - you have to add the user to the database you created (its just one more step). Anyway - I got the same error as you when I made these mistakes. I'm sure if you check it out again it will work and make sure you use the correct names when installing xoops. For a better explanation I found you a tutorial thats great:http://www.ninehours.com/tutorials/1

One more thing - why slag XOOPS - its free software?? I think its fantastic that people are developing this stuff and handing it out for free - maybe you should spend some honest time learning the system so that you can join the team in providing better support.

7
MadFish
Re: Cannot Connect to Database Please Help!!!!! (hasnt been answered yet!)
  • 2005/12/16 17:55

  • MadFish

  • Friend of XOOPS

  • Posts: 1056

  • Since: 2003/9/27


Usually this error means either i) your database server is down (in which case there is nothing you can do until your host gets it up) or ii) your database username or password are wrong (check what they are in your account, then look inside mainfile.php to make sure it is the same).

8
djsckizo
Re: Cannot Connect to Database Please Help!!!!! (hasnt been answered yet!)
  • 2006/1/3 2:23

  • djsckizo

  • Just can't stay away

  • Posts: 401

  • Since: 2003/5/9 8


Quote:

janadee wrote:
For a better explanation I found you a tutorial thats great:http://www.ninehours.com/tutorials/1


Glad to see my tutorial is helping. :) Odd to see people actually know my blog exists though lol
Afterbeing.com - Low Cost Web Hosting and Design

Lindavester.net - 400+ Photos and Powered by Xoops!

[url=http://www.sidebreak.com]Sidebreak.com - Image Hosting and Free F...

Login

Who's Online

123 user(s) are online (84 user(s) are browsing Support Forums)


Members: 0


Guests: 123


more...

Donat-O-Meter

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

Latest GitHub Commits