SMF Support > Install and Upgrade Help

Error -- " Cannot connect to database server with given data!" FIXED

(1/4) > >>

punt:
Howdy all,

I'm having a frustrating problem, and I'm wondering if anyone can lend a hand.

After filling out the SMF Installer page (things such as MySQL Servername, MySQL Database name, etc), I get the following error:

--- Code: ---Cannot connect to database server with given data!

Please check the information you provided, and then try again.
--- End code ---

I followed [Unknown]'s Guide to Installing PHP and MySQL (found here [nofollow] for those that haven't seen it. Great guide :) ) and all the testing for php and MySQL indicated that both those programs are functioning correctly.

The error message give doesn't expand on what the problem might be, so I'm not sure if it's the User/Password that's having a problem, or maybe the choice of database name. I did create a MySQL user to use only for SMF, and I am able to login in from the console using that user.

Here's some spec's:
Apache 2.0.40
MySql  4.0.18-standard
PHP Version 4.3.5

Any thoughts about what's going on? Any more info needed?

Any help at all would be greatly appreciated.

thanks :)

-punt

Chris Cromer:
Well that error means that either the user or password is wrong. Or that user doesn't have access to the  SMF database.

[Unknown]:
Are you using "root" with no password?

-[Unknown]

punt:
I had created a mysql user specifically for use with SMF. At first, I just granted all privileges to smf.* . Then I tried granting ALL privileges on *.*.

Finally, I tried using root (with the root password) to complete the install page, and I'm getting the same error message.

It would seem I have something else screwed up, but can't figure out what. I have logged in as my SMF user to mysql and accessed the self-created smf database through the console with no problems. I've tried letting the installer create the SMF database, and have tried it with the db already created.

Root has it's password set, so I used that. For kicks, I tried logging in without the root password, but, as expected, I get the same error...

Any more ideas?

Thanks for the quick replies as well :)

-punt

[Unknown]:
Hmm... does phpMyAdmin work at all?

What if you do this:

Start -> Run -> cmd

cd "C:\where you installed MySQL\bin"
mysql -uUSERNAME -pPASSWORD

This is probably the easiest and quickest way of trying it.  Once you get it open, try the following:
SHOW DATABASES;

And then you can type "exit" to quit back to the command prompt.

-[Unknown]

Navigation

[0] Message Index

[#] Next page

Go to full version