Replies: 6 comments
-
Mariadb is not mysql, those are two seperate projects. "Let me mix-and-match different sql clients and servers" seems pretty out-of-scope. |
Beta Was this translation helpful? Give feedback.
-
@Ornias1993 then why, I wonder, is the image called bitwardenrs/server-mysql, and the bitwarden_rs documentation page called Using the MySQL Backend (which makes no mention of MariaDB)? Because MariaDB is not just some other project; it's an open source "drop-in replacement for MySQL". If you read the links I provided, you can see that they maintain feature and API compatibility with MySQL. |
Beta Was this translation helpful? Give feedback.
-
@timwis Why? No idea, I didn't write the documentation. If you look at the binary, you would've known it's mariadb based and not mysql based: I think it is just a documentation issue, it should be clearly stated that the MySQL is based on MariaDB and not on MySQL. I'm running the binary with the lastest variant of the MariaDB client on the latest version of the MariaDB Server and have no such issue. To be clear: It's might work to mix match client and server, but such a thing is not guaranteed. If you run a project on MySQL it's highly advicable to run it on both client and server and the same goes for mariadb. I don't appreciate your passive agressive attitude however. edit Even the docker build script uses mariadb and I think it's wrong advice to use a MySQL server docker container with a mariadb-client frontend... Certainly because Mysql and mariadb are not 100% compatible: edit2 |
Beta Was this translation helpful? Give feedback.
-
Just commented on #1348 but I'm going to mention it here too: blaming the server is not the answer here, blaming the documentation is not the answer here, this is absolutely a client issue. MariaDB is supposed to support this, and it's not supposed to fail the way it does in #1348, and #1348 shows the complete failure with MySQL is a regression. The fix here needs to be fixing the client to either properly support the new authentication method or at the very least not failing to use the older one. |
Beta Was this translation helpful? Give feedback.
-
I have made this comment already on an other report and i will copy paste it here. TL;DR: If you ensist on using MySQL8 then create a user using To be blunt, we use the packages provided by the underlying OS, which in this case is Debian. I think you forget that every distro has there own building flags and which features they add or remove and which versions of those tools they support or not. As debian doesn't support the latest version of mariadb-client we also can not support this. I will update the documentation to mention that we do not support MySQL 8.x using it's default password caching and that you need to use the Again, this is not something we can and will fix on our side, if Debian releases a new stable version of there Distro we will update that accordingly and we just have to hope it adds this feature. Also, our builds use the MariaDB libraries since that is what Debian, Ubuntu and Alpine support, there are no packages in there main repo's which hold the Orcale MySQL libraries anymore. |
Beta Was this translation helpful? Give feedback.
-
I will convert this ticket to a discussion also since there is nothing we can do to fix the default packages from Debian. |
Beta Was this translation helpful? Give feedback.
-
Subject of the issue
In January 2018, MySQL announced they were changing the default authentication plugin for MySQL server from
mysql_native_password
tocaching_sha2_password
in MySQL v8.0.4. This required mysql clients to support thecaching_sha2_password
method in order to connect.The
bitwardenrs/msyql-server
image does not appear to support this method, which results in an error when attempting to connect to a modern MySQL (v8.0.4+) database:This can be worked around by using a user account that uses the
mysql_native_password
authentication method (as described here), but ideally we'd be able to take advantage of the latest (and most secure) authentication method.I assume this is a problem with the runtime image's
libmariadbclient-dev
supporting this authentication plugin, or perhaps how it's locating the plugin file, but I haven't been able to figure it out. MariaDB's docs suggest it should be supported (I assume it's the C library).Your environment
Steps to reproduce
Docker-compose file
Expected behaviour
Bitwarden should connect to the MySQL database
Actual behaviour
Error thrown, as described in subject section above.
Relevant logs
See subject section above.
Beta Was this translation helpful? Give feedback.
All reactions