Download & Extend

No way to specify unix socket during installation

Project:Drupal core
Version:8.x-dev
Component:install system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

Related to this issue: #561400: No way to specify MySQL socket with DBTNG

If you do need to specify a MySQL socket, not being able to do so during installation causes installation to fail. Not sure if this should be marked critical because of that?

There should be a new "socket" field in the advanced options area that's only available when mysql is selected.

Comments

#1

Category:bug report» feature request

One thing we could do is change the host field into a host/socket field (after all it's already a file for SQLite). I consider this a feature request.

#2

Yeah, something like that might be the simplest possible solution (although I am under the impression that socket is a replacement for both host and port, not just host?).

There is also a more general issue that aims to allow any database driver to add or modify options on this form in any way they want to:
#346494: DB drivers need to be able to change the configure database form during install

#3

Socket is a replacement for both host and port, given the way #561400: No way to specify MySQL socket with DBTNG is setup, if socket is present for mysql, then both host and post are ignored, even if they are present. So either there can be just an additional field for socket, or an option to use either host/port or socket (for simplicity, the former is probably better).

This issue is probably dependent on what happens over on #346494: DB drivers need to be able to change the configure database form during install , so I guess we'll wait to see what happens over there.

#4

The socket being referred to here is for the path to the socket file opened by mysql (e.g. /tmp/mysql.sock). I needed this param available so i could install d7 on zend server ce. Here's the patch...

AttachmentSizeStatusTest resultOperations
unix_socket.patch1.02 KBIdleFAILED: [[SimpleTest]]: [MySQL] Drupal installation failed.View details | Re-test

#5

Status:active» needs review

#6

Status:needs review» needs work

The last submitted patch, unix_socket.patch, failed testing.

#7

Status:needs work» active

After doing a little more research, and as stated above, socket is a replacement for host/port on mysql. There's an issue with specifying 'localhost' for the address of the database. Some LAMP stacks will use the socket instead. If the user runs into issues with this, such as on Zend Server, specify the address as '127.0.0.1'.

#8

Status:active» needs review

I see that some code in the database.inc file is already set up for socket connection, has this issue been fixed?

#9

Status:needs review» needs work

The last submitted patch, unix_socket.patch, failed testing.

#10

after going through the latest nightly the patch above DOES work, im not sure why the test system says it fails.

#11

@davehimself: were you able to install D7 on Zend Server CE without the patch using 127.0.0.1 as the host? I'm running Zend CE as well, but I'm unable to install without specifying the socket path. Thanks for the patch, but we should really get #346494: DB drivers need to be able to change the configure database form during install working first, since that will provide more robust ways of defining database configuration (as socket is only applicable to MySQL).

@flyboarder: Socket support has been added into D7, but currently there's no way to define the socket during installation, which this issue is addressing.

#12

Category:feature request» bug report

I did an install of the D7 beta posted yesterday on my Mac (Snow Leopard, running the Acquia Drupal stack), with MySQL running on 33066. The install failed every time I used "localhost", regardless of whether or not settings.php had been configured, as has been described above.

When, following instructions from response #7, I used "127.0.0.1", installation succeeded. This is, in my naive view, a bug rather than a feature request. "localhost" is valid and should be supported.

#13

Just tried to install D7 RC1 however on my Mac (OS X 10.6 + Zend Server CE) localhost and '127.0.0.1' both fail the install, i have attempted to create a symlink from the default to my specific socket but this also fails.

I was just about to go over and see if this patch that work durring the bata's would still work, however i see that the entire way that install forms are generated are completely different.

Could we have a new patch please? I attempted one myself but can't seem to figure out where the new form elements are coming from. It should be easy all it seams is missing is the actual form element, the code is already set up to use it.

#14

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

Drupal 7 is now at RC1. Form changes will not be accepted so this would have to wait until D8.

Alternatively Install Profiles have the ability to add to the installation process so you could create a Zend Server installation profile.

Also I run Zend Server and I just do the following:

cd /tmp
sudo ln -s /usr/local/zend/mysql/tmp/mysql.sock

#15

Status:needs work» needs review

Agreed that this is now pushed to 8.x, unfortunately. It's a simple patch to include the socket in the form.

AttachmentSizeStatusTest resultOperations
793200-unix_socket.patch1.05 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 793200-unix_socket.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.View details | Re-test

#16

Status:needs review» needs work

I think this needs corresponding validation to ensure that the socket exists. Also how does windoze do sockets? will this work there?

#17

Zend Server running upon AS/400 (iSeries/i5os, etc.) need to install with socket. If someone has patch for version 7.x, then I will test.

(Note: Magento allows install with socket. Zend Server AS/400 socket /var/tmp/mysql.sock)

#18

@kent_zacharias the easiest way will be to create a symlink during install
ln -s /var/tmp/mysql.sock /tmp
then after install you can set the proper socket in settings.php.

#19

Zend Server Version 5.0.4, As/400 V5R4M0, PHP Version 5.3.3, MySQL library version 5.0.45 MySQL server version 5.1.50.

I see no reference to "sockets" in settings.php

#20

Title:No way to specify MySQL socket during installation» No way to specify unix socket during installation
Status:needs work» needs review

- Added proper unix socket support for PostgreSQL.
- Added support to specify a unix socket during the install on non-Windows operating systems.

AttachmentSizeStatusTest resultOperations
793200-16.patch7.17 KBIdleFAILED: [[SimpleTest]]: [MySQL] Drupal installation failed.View details | Re-test

#21

Status:needs review» needs work

The last submitted patch, 793200-16.patch, failed testing.

#22

Status:needs work» needs review

Opps, forgot to add in core/includes/database/mysql/database.inc.

AttachmentSizeStatusTest resultOperations
793200-21.patch8.22 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 793200-21.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test

#23

Related: #1409108: Improve "Failed to connect to database" Error message—we should probably improve the error message in a manner similar to the way described there if we add this option to install, since this change makes it more likely that a mismatch between the system and Drupal values might occur.

#24

#22: 793200-21.patch queued for re-testing.

#25

Status:needs review» needs work

The last submitted patch, 793200-21.patch, failed testing.

nobody click here