Created attachment 271472 [details] mail/sqlgrey caching_sha2_password support Hi All In my server, I using databases/mysql84-server without "mysql_native_password" plugin. And mail/sqlgrey got failed as follows. Jun 4 15:16:47 mail sqlgrey: 2026/06/04-15:16:47 sqlgrey (type Net::Server::Multiplex) starting! pid(20728) Jun 4 15:16:47 mail sqlgrey: Resolved [*]:2501 to [::]:2501, IPv6 Jun 4 15:16:47 mail sqlgrey: Binding to TCP port 2501 on host :: with IPv6 Jun 4 15:16:47 mail sqlgrey: Setting gid to "11212 11212" Jun 4 15:16:47 mail sqlgrey: Setting uid to "11212" Jun 4 15:16:47 mail sqlgrey: dbaccess: can't connect to DB: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection. Jun 4 15:16:47 mail sqlgrey: dbaccess: error: couldn't get now() from DB: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection. Jun 4 15:16:47 mail sqlgrey: dbaccess: can't connect to DB: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection. Jun 4 15:16:47 mail sqlgrey: dbaccess: error: couldn't access config table: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection. I tried to fix it and generated patch in attachment for workaround. Could verify it and update ports? Thanks a lot.
The issue may indeed have become visible after the default MySQL version changed from 8.0 to 8.4, since MySQL 8.4 uses caching_sha2_password by default and mysql_native_password is no longer enabled by default on the server side. That said, I am not convinced that the proposed fix is appropriate as-is. The patch unconditionally adds: mysql_ssl=1 to every MySQL DSN, effectively forcing SSL for all sqlgrey MySQL connections. While this may resolve the problem in the reported environment, it also changes the behavior for all existing sqlgrey installations using MySQL. I would be hesitant to commit or ship such a change without further discussion, as it introduces a global behavior change and may cause regressions in deployments where SSL is not currently configured or expected. It may be worth investigating whether SSL support should instead be configurable, allowing administrators to enable it when required by their MySQL authentication and transport settings.
Hi Jochen Neumeister That's right, you are correct. This workaround is just for personal use. I hope it is useful for the maintainers.