Closed jacrasmussen closed 8 months ago
If you select localhost
as the server, then the connection should use the unix socket automatically.
(But if you select 127.0.0.1
, the the connection will use the mysql network protocol).
In your php.ini
configuration file, the setting for pdo_mysql.default_socket
must be set to the correct path.
I actually tried that among other suggestions, but I hadn't any luck connecting to the database until I reviewed the Laravel logic and found that the unix_socket parameter must be set.
I've prepared a change that I'm happy to share as a pull request, I've run the tests and setup locally and confirmed the change works and connects as expected against the socket.
f24a8589f7d8400d503c5bb64be9ca10e1637659
To support unix socket connections to MySQL/MariaDB it's necessary to add an additional parameter (unix_socket) to the connection.