[MDEV-28723] MySQL Connector fails to connect to MariaDB Created: 2022-06-01 Updated: 2022-06-20 Resolved: 2022-06-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Protocol |
| Affects Version/s: | 10.4.25, 10.5.16, 10.6.8 |
| Fix Version/s: | 10.2.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Mauro Mazzieri | Assignee: | Sergei Golubchik |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
When MySQL Connector/NET is used to connect to a MariaDB database (tested with 10.4, 10.5 and 10.6), the connection fails with a message "Versions of MySQL prior to 5.6 are not currently supported". This happens using MySQL.Data.Entity version 8.0.22 or newer. I reported the same bug to MySQL. I suggest to fix the initial version string, so that MariaDB is recognized as version 10 for example. |
| Comments |
| Comment by Mauro Mazzieri [ 2022-06-01 ] |
|
Sample stack trace: [NotSupportedException: Versions of MySQL prior to 5.6 are not currently supported] [ProviderIncompatibleException: The provider did not return a ProviderManifestToken string.] |
| Comment by Daniel Black [ 2022-06-01 ] |
|
version is a system read only variable that you can set in the configuration file. In the protocol level its doing 5.5.5-10.4.25 however explicitly setting this will correspond the the exact version that MySQL Connector/NET sees. |
| Comment by Bradley Grainger [ 2022-06-02 ] |
|
MySqlConnector (https://www.nuget.org/packages/MySqlConnector/ ) is routinely tested with MariaDB and is recommended by the MariaDB documentation: https://mariadb.com/kb/en/mysqlconnector-for-adonet/ It's also much less buggy than MySQL Connector/NET: https://mysqlconnector.net/tutorials/migrating-from-connector-net/#fixed-bugs (disclaimer: I'm the lead developer of MySqlConnector) Edit: Now I see you're using EF; there's no EF support in MySqlConnector; it can only be used with plain ADO.NET or EF Core. |
| Comment by Sergei Golubchik [ 2022-06-20 ] |
|
5.5.5- will removed in |