I'm trying to use HEAD on the Acquia stack installer and realized that the PDO MySQL stuff doesn't let you specify the socket in the .ini file. It sounds like the only way to do this is via the dsn string. Here's a trivial patch to add this to the mysql driver.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drewish’s picture

Title: No way to specify MySQL socket with DBTNC » No way to specify MySQL socket with DBTNG

lets spell it correctly.

drewish’s picture

FileSize
1.37 KB

DamZ pointed out that according to the docs you shouldn't specify host/port and socket at the same time.

drewish’s picture

FileSize
1.33 KB

adding some comments.

Status: Needs review » Needs work

The last submitted patch failed testing.

drewish’s picture

Status: Needs work » Needs review

i want a re-test.

Crell’s picture

The approach here is sound, bot permitting. But it should probably be documented in the INSTALL.mysql.txt file as well. (It's too much of an edge case to put in settings.php directly, IMO.)

Status: Needs review » Needs work

The last submitted patch failed testing.

Crell’s picture

Someone want to get back to this or no? :-)

drewish’s picture

Status: Needs work » Needs review

i want to see what the test bot says.

Status: Needs review » Needs work

The last submitted patch failed testing.

Crell’s picture

Version: 7.x-dev » 8.x-dev
Crell’s picture

BarisW’s picture

I have the same issue. The patch from #2 is working. Without this, I was unable to install Drupal 7 on my Reseller server.

Is there a reason not to include this in V7? I'm not sure how many people have this issue, but I think I'm not the only one. If we decide to postpone this to Drupal8, we should at least set a message with the description of the error.

Crell’s picture

It's not in D7 because no one was able to drive it home before code freeze. I am willing to make an exception for it if webchick is. The approach seems sound, but it needs to pass the test bot. I also don't quite know how we can test this. :-)

Damien Tournoud’s picture

Version: 8.x-dev » 7.x-dev

This is a bug report. Bugs are fixed in the current development version before being backported. This should never has been pushed to D8.

Berdir’s picture

Status: Needs work » Needs review
FileSize
1.51 KB

Re-roll, the ?: needs brackets around the whole statement.

duellj’s picture

Status: Needs review » Reviewed & tested by the community

Patch works correctly. Was able to connect to alternate socket, and if socket is specified, then host and port are ignored (expected behavior).

BarisW’s picture

Good work! Thanks ;)

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD, thanks!

I don't think there's a way to add a test for this, so marking as fixed.

Status: Fixed » Closed (fixed)

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