[Pkg-roundcube-maintainers] Bug#963875: Bug#963875: roundcube: SQL Error

Guilhem Moulin guilhem at debian.org
Sun Jun 28 23:02:08 BST 2020


Control: tag -1 + unreproducible moreinfo

On Sun, 28 Jun 2020 at 14:35:11 +0100, Nigel Horne wrote:
> Fails to install properly with 'apt install roundcube':
>
> Creating config file /etc/roundcube/debian-db.php with new version
> checking privileges on database roundcube for roundcube at localhost: user creation needed.
> granting access to database roundcube for roundcube at localhost: failed.
> error encountered creating user:

Can't reproduce this in a clean sid chroot, and piuparts didn't complain
either: https://piuparts.debian.org/sid/pass/roundcube_1.4.6+dfsg.1-2.log

> mysql said: ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS 'roundcube'@'localhost'' at line 1
> dbconfig-common: roundcube configure: trying again.

It's not us doing the user creation but dbconfig-common.  So your RDMS
doesn't like the CREATE USER statement?  Which MySQL flavor are you
using?  MariaDB or MySQL?  Which version?

It appears MySQL ≤5.6 doesn't support `CREATE USER IF NOT EXISTS` [0],
however Debian has only 5.7.26 (in sid only) [1] which does [2].  And as
of Debian Stretch the default MySQL flavor is MariaDB which *does*
support `CREATE USER IF NOT EXISTS` since 10.1.3 [3].

-- 
Guilhem.

[0] https://dev.mysql.com/doc/refman/5.6/en/create-user.html
[1] https://tracker.debian.org/pkg/mysql-server
[2] https://dev.mysql.com/doc/refman/5.7/en/create-user.html
[3] https://mariadb.com/kb/en/create-user/#if-not-exists
-------------- 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/20200629/3b099ba4/attachment.sig>


More information about the Pkg-roundcube-maintainers mailing list