Feature: support Unix sockets for databases #355

Closed
opened 2026-02-04 18:58:29 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @AceBlade258 on GitHub (Jun 11, 2017).

Please add support for unix sockets for databases such as MySQL and Postgres.

As far as I can tell, this is easily accomplished by adding the following to database.php:

'unix_socket'   => env('DB_SOCKET', null),
Originally created by @AceBlade258 on GitHub (Jun 11, 2017). Please add support for unix sockets for databases such as MySQL and Postgres. As far as I can tell, this is easily accomplished by adding the following to database.php: 'unix_socket' => env('DB_SOCKET', null),
Author
Owner

@ssddanbrown commented on GitHub (Jun 17, 2017):

Hi @AceBlade258,
Unix sockets can be set via the DB_HOST .env variable using the following format:

DB_HOST=localhost;unix_socket=/var/run/mysqld/mysqld.sock

Tested on my Ubuntu machine. Let me know if that doesn't work for you and I'll re-open this.

@ssddanbrown commented on GitHub (Jun 17, 2017): Hi @AceBlade258, Unix sockets can be set via the `DB_HOST` .env variable using the following format: ``` DB_HOST=localhost;unix_socket=/var/run/mysqld/mysqld.sock ``` Tested on my Ubuntu machine. Let me know if that doesn't work for you and I'll re-open this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#355