Installing Gallery 2 Database error

captain4434

Joined: 2005-12-16
Posts: 7
Posted: Fri, 2007-02-09 21:21

I am stuck at step 5. This is what I get. I know little about Databases. I have created a Data base on my web server...Please Help.

Unable to connect to database with the information provided.
Database Setup

Please select your database type and enter your database authentication information. The installer will not create the database for you, so you must create one yourself and enter the database name here. If you are installing Gallery into a database that already has tables in it, the table and column prefixes will keep Gallery data from conflicting with what you already have.
Database type:
DB Hostname:
DB Username:
DB Password:
DB Name:
Table Prefix:
Column Prefix:
We received the following database related errors:

Warning: mysql_connect(): Access denied for user: 'connsqua_g2@localhost' (Using password: YES) in /home/connsqua/public_html/gallery2/lib/adodb/drivers/adodb-mysql.inc.php on line 348
localhost: Access denied for user: 'connsqua_g2@localhost' (Using password: YES)

 
Craig Metz

Joined: 2007-02-11
Posts: 4
Posted: Sun, 2007-02-11 22:56

I have the same problem - everything looks correct but get the "Access denied for user:" comment as well. I called my hosting company "1and1" and they said that I wasn't even hiting the host. Not sure they were sure though.

Hopefully someone has an answer for the both of us

Gallery version: 2.1
PHP version (e.g. 5.2.1)
Webserver (e.g. Apache 2.2.4)Win 32 no SSL
Database MySQL (Not sure what version 1and1 is running)
Operating system: Windows XP
Browser: ie7

 
george9t8

Joined: 2007-02-06
Posts: 129
Posted: Mon, 2007-02-12 09:17

I'm also getting this now I'm trying to re-install Gallery2.

Are you two reinstalling as well? Maybe it has something to do with a previous installation.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2007-02-12 10:06

this error means that the database connection information isn't correct or that the database user doesn't have sufficient permission to connect to the database.

--------------
Enter the Gallery 2 Theme Contest today!

 
george9t8

Joined: 2007-02-06
Posts: 129
Posted: Mon, 2007-02-12 10:38

I doubt this is the case.

I was able to access it with no problems when I first installed G2 with same login information.

As two other people are currently experiencing this it seems to be a problem with the G2 installation software, no?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2007-02-12 10:58

the error comes straight from mysql. are you all on the same webhost (1and1)?

--------------
Enter the Gallery 2 Theme Contest today!

 
george9t8

Joined: 2007-02-06
Posts: 129
Posted: Mon, 2007-02-12 11:11

No, I'm with UK2.

When I login through PHPMyAdmin via my web host I can connect to the database OK with the same credentials. That's the strange thing.

One thing I noticed is that after clicking on the Save button, when the error appears, the password field contains less characters than what I entered. COuld it be the password is being altered?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2007-02-12 11:27

> the password field contains less characters than what I entered.

that's just a symbol for the password you entered. it shows 6 stars or so no matter what you entered. but it knows what you entered. that's a security precaution.

--------------
Enter the Gallery 2 Theme Contest today!

 
george9t8

Joined: 2007-02-06
Posts: 129
Posted: Mon, 2007-02-12 12:58

I've just remembered that this was with the typical version, and when I ran it the first time it was the full version.

It's possible it may be a problem with the typical install files so I'll try again with the full version tonight.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2007-02-12 13:16

there's no difference between the full and typical version when it comes to database connections or the installer.

--------------
Enter the Gallery 2 Theme Contest today!

 
Craig Metz

Joined: 2007-02-11
Posts: 4
Posted: Tue, 2007-02-13 02:07

When I use the appropriate host name it looks like it sees me but denies the credentials - if I put in the wrong host name it says not found. Therefore, I think the username and db name are being denied for some reason. I called "1and1" and they confirmed that they are correct so seems I am stuck unless someone has solved this problem.

Thanks for your help!

 
george9t8

Joined: 2007-02-06
Posts: 129
Posted: Tue, 2007-02-13 07:12

Same here. When I enter the correct password I get:

"localhost: Access denied for user: '<myusername>@%' to database 'gallery2'"

When I enter an incorrect password I get:

"Warning: mysql_connect(): Access denied for user: '<myusername>@localhost' (Using password: YES) in /home/g/e/<mydomain>/gallery/lib/adodb/drivers/adodb-mysql.inc.php on line 348
localhost: Access denied for user: '<myusername>@localhost' (Using password: YES)"

So it does seem to be a G2 problem.

 
lance_alx

Joined: 2007-02-12
Posts: 2
Posted: Tue, 2007-02-13 08:38

I've also had this issue... I first installed 2.1 on my database. Decided to upgrade to 2.2, so I deleted all my 2.1 tables through phpmyadmin. then tried installing 2.2 and used to same credentials for 2.2 as i used for the 2.1 install. And i'm getting this error.

Also I tried Ftp deleting the Gallery2 dir, and it will not let me for some reason. Can anyone help me with that?

 
george9t8

Joined: 2007-02-06
Posts: 129
Posted: Tue, 2007-02-13 09:05

Reading the first post again it seems like captain4434 has entered the wrong password or username, whereas Craig Metz has the same problem as me.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-02-13 09:33

> So it does seem to be a G2 problem.

i wouldn't come to this conclusion.
it sounds more like your mysql server doesn't allow connections from localhost.
it's a mysql server configuration problem:

- http://dev.mysql.com/doc/refman/5.0/en/access-denied.html
- http://mysqld.active-venture.com/Access_denied.html (look for "to database" in that article)

more articles on that topic:
http://www.google.com/search?q=mysql+localhost%3A+Access+denied+for+user%3A+%22to+database%22
--------------
Enter the Gallery 2 Theme Contest today!

 
george9t8

Joined: 2007-02-06
Posts: 129
Posted: Tue, 2007-02-13 12:21

OK thanks valiant, I'll raise this with my web host.

 
george9t8

Joined: 2007-02-06
Posts: 129
Posted: Tue, 2007-02-13 13:04

I've been a bit stupid. I left the database name as 'gallery2' thinking this would be created by the install program.

I then realised this should be the database name your web host has set you up with. Log into PHPMyAdmin to see what this is.

Hopefully this is the cause of the other people's problem.

Thanks valiant for your time. And sorry for pointing the finger at G2!

 
Craig Metz

Joined: 2007-02-11
Posts: 4
Posted: Thu, 2007-02-15 04:19

Valiant,

Thank you as well for your time and insights and I will call "1and1" again and see if I can find the appropriate level 2 expert. It feels like a credentials problem with MySYQ to me.

Cheers,

 
rollingsphere

Joined: 2007-02-15
Posts: 1
Posted: Thu, 2007-02-15 08:57

I am having the same problem.

I have localhost as my DB Hostname, the db user name and password i got from my Media Temple host. I also created a new database, and have the correct name there. I am not sure what to do here? Is there a problem on my host end? What do i need to check?

Thanks!
Jeremy

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2007-02-15 09:36

if you get the same error as the guys above, please send an email to your webhost support team declaring exactly what you enter for "db name, db hostname, db username, db password" and ask them whether this is correct.

--------------
Doumentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
Craig Metz

Joined: 2007-02-11
Posts: 4
Posted: Sat, 2007-02-17 01:40

Valiant,

I spoke with 1&1 and found someone very helpful and the solution was simple once you know what to do. When you are asked to enter in the description one assumes it is the name you gave the database but it is not. It is the db'number' provided by the host. What Gallery calls description they call database name.

Hope this helps.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2007-02-17 02:30

description?
g2 has fields for "DB Hostname" and "DB Name", nothing about description.

--------------
Doumentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
brewster

Joined: 2010-07-12
Posts: 47
Posted: Tue, 2010-07-13 15:48
george9t8 wrote:
I've been a bit stupid. I left the database name as 'gallery2' thinking this would be created by the install program.

I then realised this should be the database name your web host has set you up with. Log into PHPMyAdmin to see what this is.

Hopefully this is the cause of the other people's problem.

Thanks valiant for your time. And sorry for pointing the finger at G2!

George,

Your posted was God sent! After spending hours yesterday and today trying to resolve this issue, I happened to read your post. I changed the database name, pressed <enter> and it worked!!

Thank you very much!!!