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 !).
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 !).
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
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

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
82d9abca3d
.