[Pkg-roundcube-maintainers] Roundcube mysql access change recommendation
Guilhem Moulin
guilhem at debian.org
Wed Aug 7 22:31:22 BST 2024
Hi,
On Wed, 07 Aug 2024 at 17:55:52 -0300, kurt--- via Pkg-roundcube-maintainers wrote:
> I have noticed that the installer for roundcube by in Debian by default (for
> mysql/mariadb connections) sets up the database to use the php "mysql"
> driver. It points it to a mysql instance on localhost at port 3306. I
> would like to note that officially, the php mysql extension is no longer
> recommended for use, and hasn't been for some time. This should be updated
> to "mysqli".
The “mysql” and “mysqli” drivers are aliases (from upstream, cf. program/lib/Roundcube/rcube_db.php),
but the code uses neither mysql_* nor mysqli_* so it's only cosmetic
anyway. The database wrapper classes use PDO instead.
> Also, since there is no real method in Debian to even point roundcube at a
> remote database at install time, perhaps you might consider to change the
> installer to use Unix sockets for talking to the database. There is not
> even a clear way for the end user to edit the generated
> /etc/roundcube/debian-db.php to let it use sockets, though it is possible by
> clearing the port and setting the host to
> "unix(/var/run/mysqld/mysqld.sock)". It is however unintuitive. And since
> every mariadb install by default listens on a unix socket, it would be a
> performance improvement to switch the default behaviour.
The default DSN “mysql://roundcube:@localhost/roundcubemail” already
talks to MariaDB through its UNIX socket, because MariaDB treats
“localhost” specially. (Use 127.0.0.1 instead to use the INET socket.)
Cheers,
--
Guilhem.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-roundcube-maintainers/attachments/20240807/69b75bfe/attachment.sig>
More information about the Pkg-roundcube-maintainers
mailing list