Bug #104845 Version string not in acceptable format error while connecting to -log enabled
Submitted: 6 Sep 2021 15:23 Modified: 9 Sep 2021 13:14
Reporter: Sudheesh PM Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:5.7.33-log OS:Any
Assigned to: CPU Architecture:Any

[6 Sep 2021 15:23] Sudheesh PM
Description:
When I connect to the MySQL instance (Which is log enabled) I receive the following error

MySql.Data.MySqlClient.MySqlException
  HResult=0x80004005
  Message=Version string not in acceptable format
  Source=MySql.Data
  StackTrace:
   at MySql.Data.Common.DBVersion.Parse(String versionString)
   at MySql.Data.MySqlClient.NativeDriver.Open()
   at MySql.Data.MySqlClient.Driver.Open()
   at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
   at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
   at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
   at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
   at MySql.Data.MySqlClient.MySqlPool.GetConnection()
   at MySql.Data.MySqlClient.MySqlConnection.Open()
   at <Program>$.<<Main>$>d__0.MoveNext() in C:\Users\ADMIN\source\repos\TestInfogram\TestInfogram\Program.cs:line 11

  This exception was originally thrown at this call stack:
    [External Code]
    <Program>$.<Main>$(string[]) in Program.cs

My connection string is as below

var mscon = new MySqlConnection("server=myserverip;uid=myusername;pwd=mypassword;database=mydatabase;charset=utf8;");

I am able to connect to this instance from workbench and the user has all privileges

When I run SELECT VERSION();  it returns

'5.7.33-log'

How to repeat:
install Mysql Server version with logging enabled. This will result in appending -log along with the actual version number

run the following command

it should return 

'5.7.33-log'

Here, I believe what version of MySQL is irreverent. any additional flags returned along with the version would be a problem.

Then Create a Mysql connection and then an exception will be thrown

Suggested fix:
It should ignore the flag associated with the version and continue. I tried to use another opensource connector https://www.nuget.org/packages/MySqlConnector/ , and it connects fine with the same instance
[9 Sep 2021 13:14] MySQL Verification Team
Hello Sudheesh,

Thank you for the bug report.
I tried to reproduce your issue on windows 10 with MySQL server 5.7.33 log enabled and tried to connect to database from connector but I am not seeing any issues at my end. If you can provide more information, feel free to add it to this bug.

Thank you for your interest in MySQL!

Regards,
Ashwini Patil