docs icon indicating copy to clipboard operation
docs copied to clipboard

Document how to use MySQL / MariaDB UDS instead of TCP in parameters.yml

Open GottZ opened this issue 5 years ago • 1 comments

Today i noticed, you can omit database_host and database_port inside parameters.yml to let Doctrine use /run/mysqld/mysqld.sock, or what ever is configured in php.ini's mysqli section, instead.

https://github.com/doctrine/dbal/blob/16878650d79934c31e27a13618ed6f3effee80d8/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php#L67

I assume it would be great to either add database_unix_socket and / or database_dca to parameters.yml in future Contao Versions, as well as document that this Fallback can be used to gain access to the default or php.ini configured UDS.

This Documentation would have saved me quite some Time today.

GottZ avatar Oct 14 '20 18:10 GottZ

Do you mean

# config/config.yaml
doctrine:
    dbal:
        unix_socket: ...

? This is documented here: https://symfony.com/doc/current/reference/configuration/doctrine.html

I suppose the manual could reference this somewhere in a section for more advanced configurations.

fritzmg avatar Nov 02 '20 00:11 fritzmg