"unable to connect to your MySQL server"

Jayh

Joined: 2006-02-21
Posts: 21
Posted: Fri, 2011-05-20 19:47

I did setup a new MySQL database named "gallery301" and user name and password (showing in the database list), but I still get the error message whe press "continue": "We were unable to connect to your MySQL server with the username and password that you provided. Please go back and try again!" I'm really confused, can't figure out what could be wrong. Any suggestions? A million thanks!

MySQL Version: 5.0.45, PHP 5 (not sure if it's 5.2.3), "var" 777...

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2011-05-20 20:06

You need to enter your database name, database username, password for that user, and the database host name on this screen:
http://codex.gallery2.org/images/6/63/Gallery3_install_screenshot.png

See this for more details:
http://codex.gallery2.org/Gallery3:User_guide:Gallery3:Installing_and_upgrading#Installation

If you are not sure where to get some of that information, you'll need to contact your host.
____________________________________________
Like Gallery? Like the support? Donate now!

 
Jayh

Joined: 2006-02-21
Posts: 21
Posted: Fri, 2011-05-20 20:24

Thanks for your input; I did follow the instructions, entered database name, database username and password...still gave me the error message, driving me nuts.

"We've found a place to store your photos: /hermes/bosweb/....../public_html/gallery3/var/" that one is automatic, I don't need to change anything, right?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2011-05-20 21:49

The only other thing I can think of is try making sure that the password for that mysql user is just alpha-numeric, no characters (#, @, !, &, %, etc)

If that's already the case, then ask your host. Gallery, like any application, is just making a standard connection to the database using the credential you provide. Either those credentials are entered correctly and the connection is made or they are not entered correctly and the connection cannot be made. No different than all of my users who say "I'm entering the right password, but it says it's not the right password". It's either right or wrong. :)
____________________________________________
Like Gallery? Like the support? Donate now!

 
Jayh

Joined: 2006-02-21
Posts: 21
Posted: Tue, 2011-05-24 19:19

Now I have to double check with a dumb question: Should I set up a database with user name and pwd BEFORE running G3 installation, or is the database with user name and pwd being set up upon installation here at http://codex.gallery2.org/images/6/63/Gallery3_install_screenshot.png? Either way didn't work for me. My host company helped me set up G3, but they had no info why I failed. Then I'm trying to install G3 under another domain/host, I still got the same problem. Something is stupidly wrong:-P Can't be pwd, I believe (must contain at least 1 uppercase letter and one number, no special char)

 
Jayh

Joined: 2006-02-21
Posts: 21
Posted: Tue, 2011-05-24 19:23

ps, I can enter phpMyAdmin using the user name and pwd

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2011-05-24 19:26

The Gallery installer does not create a database. You have to have a database created and know the login credentials for connecting to that database before you start installing Gallery.

Don't confuse the username and password you use to connect to your database with anything to do with Gallery. That is just information Gallery uses to connect to your database. You also need a valid database name and hostname.
____________________________________________
Like Gallery? Like the support? Donate now!

 
noidea

Joined: 2011-05-25
Posts: 1
Posted: Wed, 2011-05-25 10:38

I just had the same problem you described.
The solution was, that I copied the database name including some blanks at the end which I didn't see in the entry field.
After deleting these blanks all worked without problems.

 
Jayh

Joined: 2006-02-21
Posts: 21
Posted: Wed, 2011-05-25 23:42

OK, finally, I used the actual database host name to replace that "localhost" and it worked! I was assuming that it was the same server as my Gallery 3 and I didn't need to change...big mistake

Thank you all for the input!