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