My Unix host does not use localhost to access the database, and I inadvertently overlooked the Advanced settings where the database host can be entered.

Is it not possible to check whether localhost is valid, and if not, automatically open the Advanced setting options?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Version: 6.0-beta4 » 7.x-dev
Category: bug » feature
Status: Active » Closed (won't fix)

how could we check that there is a mysql running on localhost? that's impossible.

Damien Tournoud’s picture

Title: localhost database does not exist » Usability: intelligent connection error handling during install
Component: install system » usability
Priority: Minor » Normal
Status: Closed (won't fix) » Active

Interesting idea. Promoting to "Usability".

If no server is running under localhost and you don't change the parameters in the collapsed "Advanced options" fieldset, the installer returns the cryptic error message: "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'". Maybe we could handle error messages intelligently and form_set_error the relevant fields depending on the error (ie. Host in case of a connection error, User and Password for an authentication error, etc.).

coltrane’s picture

Component: usability » install system
Category: feature » task
Issue tags: +UBUserTesting2009

Identified at UB Usability Testing: http://www.drupalusability.org/node/12

We get a form set error on the database name if field is empty, but no other field identifiable errors.

Bojhan’s picture

Issue tags: -UBUserTesting2009

This issue does not correspond to the issue found at UBUserTesting2009, that one was related to wrong password/username (although this one is related - its in the error) - I don't think it is part.

jabapyth’s picture

Status: Active » Needs review
FileSize
3.32 KB

The two issues are closely related -- as the error for both connection and login are handled as one.
Here's a patch to make things a bit more user friendly :)
[this is a small bugfix patch, just to get things reasonable ;). If it goes through I'll work on making the error handling intelligent and more helpful]

before screenshot
after screenshot

please review?

thanks,
Jared

Dries’s picture

jabapyth, could you roll a 'regular' patch?

Berdir’s picture

When creating patches, please use the options -up.

jabapyth’s picture

Ah, that's how it's done. sorry, couldn't seem to find the right arguments.

Dries’s picture

Status: Needs review » Needs work

The code comments need some work; better explanation and conform to our coding style.

<b>%error.</b> should be: <strong>%error</strong>. -- also note the position of the point.

Otherwise looks good to me.

michaelfavia’s picture

Status: Needs work » Needs review
FileSize
2.83 KB

Updated to address Dries code comment style and HTML issues.

Status: Needs review » Needs work

The last submitted patch failed testing.

lilou’s picture

Status: Needs work » Needs review

testbot failure.

Dries’s picture

This looks good to me, but I haven't tested it. If someone can try testing this, it should be RTBC.

jabapyth’s picture

thanks for doing that, michaelfavia

pp’s picture

Status: Needs review » Reviewed & tested by the community

It works fine.

I tried it with Mysql and SQLite.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.