"Cannot Connect to Database"

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
maryp
Registered User
Posts: 59
Joined: Sat Aug 09, 2003 5:53 pm

"Cannot Connect to Database"

Post by maryp »

Here is part of an ongoing thread I have at my hosts forum..
It outlines the problem.
All files are loaded.
database made
user created
I can get to the "install.php" but cannot get it to install!
quote:
--------------------------------------------------------------------------------
John..
fields in your script or script setup dialog:

database server type = mysql
server name = localhost
database name = circusc_phpbb
database user name = circusc_bozo
database user password = clown
--------------------------------------------------------------------------------

mary...

I have double checked and triple checked..
that I've done all of the above.
But..when I hit install
I get "cannot connect to database"
It's driving me crazy.

08-08-2003 04:32 PM

TomD
Senior Customer

1. Did you create the database and assign the user? If so, what is the database name and user name? Don't include the password. (The most common problem here is forgetting to assign the user to the database. The second most common problem is this is all case sensitive. DataBase is not the same as DATABASE is not the same as database.)

2. Cut and paste the phpBB config info into a message - change the password - so we can see what that looks like.


08-08-2003 05:16 PM

JohnSchubert
Senior Customer
With MyPhpAdmin, can you click on the field that says "No Databases" and see a drop down window that includes the database?? If not, then you didn't actually create the database. Go back to the controlpanel, click on the MySql icon, and towards the bottom there will be a button with a "create database" button, next to a text field.

So type in a database name that is descriptive, but short. I.e. cafe_blog Click on "create database". Now it will show up in the list. Next create a user. Type in a name and password and click "Create User". Now you need to associate that user with the database. You'll see buttons to do that as well. Some of my verbage will be a little off as I don't have access to my ControlPanel from work (they block port 2082).

After creating the database and user, MyPHPAdmin will allow you to see it. Without running your install scripts, however, there won't be anything to see.

Also, be advised that HostRocket prefixes all names for the DB with your own username. So if your username is "foo", a data base called "bar" will show up as "foo_bar". When you configure your script, use the complete name of foo_bar

John

08-08-2003 05:36 PM

maryp
I did create a database.
I did assign a user
I did add colinfa_ before both in the config

I put database type as MySQL 3x
..when I do that I just get "cannot connect to database
When I put type as MySQL 4x
..then I get this error


quote:
--------------------------------------------------------------------------------
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/colinfa/public_html/phpBB2/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/colinfa/public_html/phpBB2/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database
--------------------------------------------------------------------------------


I put server hostname as localhost

For Admin login and password I used my
HostRocket name and password..is that correct?



08-08-2003 05:41 PM

JohnSchubert
Senior Customer

Have you tried the name and password for the user you created (rather than the one for HostRocket)?? If not, give that a try.

I keep the database passwords different than the HR login name and passwords for security reasons. If someone looks at your php.config file they now have your account password. Just a FYI.

John

08-08-2003 05:46 PM

maryp
My user name and passwords for HR login and database are different..
I'll try using the database one in the two different areas.

**********
note..that last step didn't work either.
Any suggestions appreciated.
~mary~
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Post by A_Jelly_Doughnut »

Try choosing database type = MySQL 3.x, not MySQL 4.x :)
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
User avatar
Justin171985
Registered User
Posts: 128
Joined: Fri Jun 27, 2003 9:03 pm

Post by Justin171985 »

Make sure that a user/pw is added to the database or it wont connect and make sure that all of you db info. is correct with the config.php file in ur phpBB directory

Hope this Helps,
Justin.
maryp
Registered User
Posts: 59
Joined: Sat Aug 09, 2003 5:53 pm

Post by maryp »

Thanks..
I did add a user and password to the database.
In fact..I just tried deleting old and making new to make sure.

I did find out for sure that it should be MSQL 3 not 4.
make sure that all of you db info. is correct with the config.php file in ur phpBB directory

I'm not sure what that means??

Also..I'm waiting for response from my host. In reading a bunch of FAQ's it looked the problem may "possibly" be that I need "permission" to connect to the database. If I understood the post..that may be it.

It's about the only thing that makes sense at this point..other than a corrupt file or something.
maryp
maryp
Registered User
Posts: 59
Joined: Sat Aug 09, 2003 5:53 pm

Post by maryp »

Ok..I've made progress with alittle help from my host..

Now..I connected to database but I got a message that my config file had to be uploaded. I had them send it to me..I manually uploaded.

I went back to the install..
this time I get this error:
An error has occurred during installation
An error occurred trying to update the database
Table 'phpbb_auth_access' already exists


When I try to go back and do it as an "upgrade" then..
It just sends me back to the first page.
I even reuploaded the config.php file just to be sure


I am getting very frustrated! :(
~mary~
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Post by A_Jelly_Doughnut »

A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
maryp
Registered User
Posts: 59
Joined: Sat Aug 09, 2003 5:53 pm

Post by maryp »

Tried both things..
Changing the prefix tp phpbb1_
that didn't work

and then tried making new config.php file and uploading it.
Still get
this message:
An error has occurred during installation
An error occurred trying to update the database
Table 'phpbb_auth_access' already exists


arrrrrrrrrrghhhhhhhhhhh!
User avatar
blueadmin
Registered User
Posts: 124
Joined: Wed May 14, 2003 4:58 pm
Location: Bradford, UK

Post by blueadmin »

if you go to your index file what does it do?

It may be you have already installed everything.
Ho Ho Ho merry christmas
You Stuck? Read this before askinghere and here
maryp
Registered User
Posts: 59
Joined: Sat Aug 09, 2003 5:53 pm

Post by maryp »

Well.. don't you think they should give you an "installation complete" message at some point! LOL

Ok..I'm sure I'll be back when I'm configuring the board! :)
Thanks for everyone's help.
~mary~
maryp
Registered User
Posts: 59
Joined: Sat Aug 09, 2003 5:53 pm

Post by maryp »

ok..first problem..
when I call up http://www.colinfarrellfansite.org/index.php

None of the links work..I can't log in as an admin to do anything.
Does this mean that the installation really didn't finish??
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Post by A_Jelly_Doughnut »

That is phpBB Plus (not supported here, officially)

Note that the search engine would have your answer.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
Locked

Return to “2.0.x Support Forum”