Bug #96717 8.0.17 not compatible with old servers due to lack of lower_case_table_names
Submitted: 2 Sep 2019 13:11 Modified: 2 Sep 2019 15:40
Reporter: Michał Smoliński Email Updates:
Status: Unsupported Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:8.0.17 OS:Any
Assigned to: CPU Architecture:Any

[2 Sep 2019 13:11] Michał Smoliński
Description:
Can't connect to old server versions due to lack of some global variables like @@lower_case_table_names. Probably caused by implementation of bugfix https://bugs.mysql.com/bug.php?id=93202

Error message:
'MySql.Data.MySqlClient.MySqlException (0x80004005): Unknown system variable 'lower_case_table_names' at MySql.Data.MySqlClient.MySqlStream.ReadPacket() at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId) at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId) at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) at MySql.Data.MySqlClient.MySqlDataReader.NextResult() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() at MySql.Data.MySqlClient.Driver.LoadServerProperties(MySqlConnection connection) at MySql.Data.MySqlClient.Driver.Configure(MySqlConnection connection) at MySql.Data.MySqlClient.MySqlConnection.Open()

How to repeat:
Just use connector in version 8.0.17 or 6.10.9 to open connection to old server, ie. 5.0.67.

Suggested fix:
Check server version first and ask only for supported global variables or ignore the error and assume default value in such case instead of throwing exception.
[2 Sep 2019 15:40] MySQL Verification Team
Thank you for the bug report. Unsupported please see MySQL Server requirement:
https://dev.mysql.com/doc/connector-net/en/connector-net-versions.html.
[13 Oct 2020 10:47] Anguel G
Hello , i have the same problem , it's because the new connectors did't support the old bases . The solution is :

Just change the connector to older version 6.7.4 ( for windows)

downloid il from here :
https://downloads.mysql.com/archives/c-net/