Control: tag -1 moreinfo On Sun, 09 May 2021 at 01:48:16 -0300, Kurt Fitzner via Pkg-roundcube-maintainers wrote: > If you manually run dpkg-reconfigure roundcube-core, then the full > installation > script is run and you are asked to specify the connection method. The default > method purports to be by unix socket (though you can also select tcp/ip). > Setting > this to unix socket, though, has no effect anywhere. It does not make any > changes > to either /etc/dbconfig-common/roundcube.conf or /etc/roundcube/debian-db.php.
That dialog belongs to dbconfig-common, but AFAICT selecting UNIX sockets set ‘dbc_dbserver’ to the empty string or to ‘localhost’, which in turns point dbconfig and roundcube to the MySQLd's default UNIX socket. That behavior is consistent with the mysql(1) binary's. > # dbc_dbserver: database host. > # leave unset to use localhost (or a more efficient local method > # if it exists). > #dbc_dbserver='localhost' > dbc_dbserver='unix(/var/run/mysqld/mysqld.sock)' > > If you use the above setting you can then generate a config file with: > > $ /usr/sbin/dbconfig-generate-include /etc/dbconfig-common/roundcube.conf > > The generated connection settings from this will cause roundcube to correctly > log in with unix sockets. However, if dpkg-reconfigure is subsequently run: > $ dpkg-reconfigure roiundcube-core > > then it will itself fail with a connection error when it tries to connect to > mysql. Reading the dbconfig-common documentation I don't see where to pass the path to a custom UNIX socket. So the first step would be to file a whishlist bug against dbconfig-common and ask for that interface. Then we could change debian-db-roundcube.php to pass unix(…) accordingly. > The above setting for dbc_dbserver was crafted to give a correct connection > string when it is parsed by /etc/roundcube/debian-db-roundcube.php. > > So the issue is, there is no way with the given tools to make persistent > configuration files that will employ unix sockets. [/var]/run/mysqld/mysqld.sock is MySQL/MariaDB's default socket path, and as long as you don't need another path you can set ‘dbc_dbserver’ to the empty string or to ‘localhost’. -- Guilhem.
signature.asc
Description: PGP signature

