packweb-multi-php: Allow php to contact local mysql with localhost #116
Loading…
Reference in New Issue
No description provided.
Delete Branch "mtrossevin/ansible-roles:packweb-multi-php2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PHP translate localhost to a socket path when connecting to a mysql/mariadb database. This break when using packweb-multi-php as the socket isn't present in the containers.
This PR create a bind mount of the host /run/mysqld (=/var/run/mysqld) where this socket is present by default for the mariadb package in debian. It also change the default configuration of mysql so that it is also where the socket is put instead of /tmp/mysql.sock (the default with Oracle MySQL).
This PR was tested with an evolixised VM running Debian 10 (It worked !).
LGTM
Just don't forget to also update the config for mysql client if you change the path of the UNIX socket in the role mysql-oracle
Done
Cc: @lpoujol