** Description changed:
For user authentication, dovecot supports different DB backends: mysql,
postgres, mariadb via its mysql_driver (shared library).
Currently in Stonking, the test for mariadb [1] is failing [2] with
mysql9.7 (-proposed) and here is the relevant dovecot journalctl log
(with a customized test that outputs debug log):
$ journalctl -u dovecot
...
Aug 03 21:04:07 stonking6 dovecot[14710]: auth: Error:
mysql(/run/mysqld/mysqld.sock): Connect failed to database (dovecot):
Authentication plugin 'mysql_native_password' cannot be loaded:
/usr/lib/mysql/plugin/mysql_native_password.so: cannot open shared object
...
The test runs fine with mysql8.4 (resolute + stonking devel).
+ ANALYSIS
+ ---
+
+ dovecot mysql driver use the libmysqlclient from mysql-9.7 to talks to
+ SQL backends (mysql, postgres, mariadb) instead, for example, of using the
+ mariadb-client
+
+ This assumes a compatiblity between mysql client and mariadb in this
+ case.
+
+ However, mysql9.7 removed the support for mysql_native_password (that is not
the
+ case for mariadb).
+
+ This probably cause a compatibility issue.
+
+ Simple C program to reproduce the error:
+
+ main.c
+ ----
+
+ #include <stdio.h>
+ #include <mysql.h>
+
+ int main(void)
+ {
+ MYSQL mysql;
+ mysql_init(&mysql);
+
+ int timeout=3;
+ mysql_options(&mysql, MYSQL_OPT_CONNECT_TIMEOUT, &timeout);
+
+ if (!mysql_real_connect(&mysql,
+ NULL,
+ "dovecot",
+ "test",
+ "dovecot",
+ 0,
+ "/run/mysqld/mysqld.sock",
+ 0))
+ {
+ printf("Root connect failed (%d): %s\n", mysql_errno(&mysql),
mysql_error(&mysql));
+ mysql_close(&mysql);
+ return 1;
+ }
+ return 0;
+ }
+
+
+ $ apt install default-libmysqlclient-dev
+ $ gcc main.c -I/usr/include/mysql -lmysqlclient
+ $ ./a.out
+ Root connect failed (2059): Authentication plugin 'mysql_native_password'
cannot be loaded: /usr/lib/mysql/plugin/mysql_native_password.so: cannot open
shared object file: No such file or directory
+
References
---
[1] Test-Command: run-parts --report --exit-on-error
debian/tests/mariadb
[2] https://autopkgtest.ubuntu.com/results/autopkgtest-
stonking/stonking/amd64/d/dovecot/20260730_083846_39b02@/log.gz
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2162829
Title:
autopkgtests fail for mariadb server backend for users storage
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dovecot/+bug/2162829/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs