954,157 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Unable to connect to the database!

have recently migrated my ubb forum website( http://2aforum.com/ ) to a new web hosting server, i have placed the files on new server and i think directory structure is right and also set up the database through phpmyadmin, and changed config file accordingly but still i am getting this error
UBB Message We encountered a problem. The reason reported was
Script:
Line#:
SQL Error:
SQL Error #:
Query: Unable to connect to the database!

I think all the info that i have filled in config file here:

'DATABASE_SERVER' => 'db.aa.0000000.hostedresource.com',
'DATABASE_USER' => 'abcd',
'DATABASE_PASSWORD' => 'cccc',
'DATABASE_NAME' => 'ssddd', is correct because i tried to connect to db through another script and it did worked and retrieved the data so i am totally confused what i am doing wrong.. confused can anybody help

jyotiu
Light Poster
33 posts since Sep 2008
Reputation Points: 10
Solved Threads: 0
 

first and foremost, do not display ur config file here. some one might hack ur system.

check your database, and your files. can u include ur code here where the problem occurs?

according to the link that u provided, the messages says that

UBB Message We encountered a problem. The reason reported was Script: /home/content/j/o/h/johncardillo/html/forum/forums/libs/user.inc.php Line#: 445 SQL Error: Table '2aforum_data2.ubbt_USERS' doesn't exist SQL Error #: 1146

the rest of the message (not included) shows the structure of ur table. this also a security threat.

mustafaneguib
Junior Poster in Training
97 posts since Apr 2008
Reputation Points: 14
Solved Threads: 4
 

'DATABASE_SERVER' => 'db.aa.0000000.hostedresource.com',

are you sure you need to specify the full host name while connecting ? Have you checked with your webhost ?

chrisranjana
Junior Poster in Training
83 posts since Jul 2005
Reputation Points: 11
Solved Threads: 3
 

Depending on how your web host is set up, you may need to change the database server to localhost At least that is what most web hosts would have it set to.

cwarn23
Occupation: Genius
Team Colleague
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
 

first and foremost, do not display ur config file here. some one might hack ur system.

check your database, and your files. can u include ur code here where the problem occurs?

according to the link that u provided, the messages says that

the rest of the message (not included) shows the structure of ur table. this also a security threat.


This shows that database connected successfully, so that it knows that table is not existed.

foryounow
Newbie Poster
12 posts since Mar 2005
Reputation Points: 10
Solved Threads: 1
 

There was problem in web hosting actually that is why the program could not connect to the database. earlier the server was Linux based on old hosting but when moved to new hosting somehow windows hosting was opted that created all the problem.

jyotiu
Light Poster
33 posts since Sep 2008
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You