Bug #117944 | Unable to connect to any of the specified MySQL hosts. | ||
---|---|---|---|
Submitted: | 11 Apr 10:26 | Modified: | 11 Apr 12:18 |
Reporter: | RAFAEL ANTONIO VENTURA DIAZ | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | Connector / NET | Severity: | S3 (Non-critical) |
Version: | 8.3.0.0, 9.2.0 | OS: | Windows (Windows (Windows Server 2022 Datacenter)) |
Assigned to: | CPU Architecture: | x86 | |
Tags: | MySql.Data, SSL |
[11 Apr 10:26]
RAFAEL ANTONIO VENTURA DIAZ
[11 Apr 12:18]
MySQL Verification Team
Hello RAFAEL, Thank you for the report and test case. regards, Umesh
[25 Apr 16:57]
MySQL Verification Team
Hello RAFAEL, Looks like I made a mistake while verifying, due to wrong host I was getting the same error which you observed but when Developer pointed me my mistake and after correcting I'm not getting any issues. -- user mysql> create user 'ushastry'@'%' identified by 'mysql123' REQUIRE SSL; Query OK, 0 rows affected (0.03 sec) mysql> grant all on test.* to 'ushastry'@'%'; Query OK, 0 rows affected (0.01 sec) -- VS 2022, C/NET 9.2.0 and MySQL Server 8.0.41 using MySql.Data.MySqlClient; using System; namespace Bug117944 { class Program { static void Main(string[] args) { Console.WriteLine("Hellow World"); MySqlConnectionStringBuilder mySqlConnectionStringBuilder = new MySqlConnectionStringBuilder { Server = "172.27.X.Y", UserID = "ushastry", Password = "mysql123", Database = "test", SslMode = MySql.Data.MySqlClient.MySqlSslMode.VerifyCA, SslCa = @"D:\ushastry\mysql-8.0.41-winx64\data\ca-cert.pem", SslCert = @"D:\ushastry\mysql-8.0.41-winx64\data\client-cert.pem", SslKey = @"D:\ushastry\mysql-8.0.41-winx64\data\client-key.pem" }; using (MySql.Data.MySqlClient.MySqlConnection sqlConnection = new MySql.Data.MySqlClient.MySqlConnection(mySqlConnectionStringBuilder.ToString()) ) { sqlConnection.Open(); sqlConnection.Close(); } } } } -- Build started at 4:49 PM... 1>------ Build started: Project: Bug117944, Configuration: Release Any CPU ------ 1>Skipping analyzers to speed up the build. You can execute 'Build' or 'Rebuild' command to run analyzers. 1>Bug117944 -> D:\ushastry\Connectors\.NET\Bug117944\bin\Release\net9.0\Bug117944.dll ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== ========== Build completed at 4:49 PM and took 00.457 seconds ========== Hellow World D:\ushastry\Connectors\.NET\Bug117944\bin\Release\net9.0\Bug117944.exe (process 21124) exited with code 0 (0x0). Press any key to close this window . . . regards, Umesh regards, Umesh
[29 Apr 6:52]
Carlos Martinez Alvarez
Hello, As seen in your response, the difference between our issue and the test made by your team seems to be the version of database used. In our case we specified a MariaDB 10.6, whilst in your tests you connected to a MySQL 8.0.41. We're not sure if this difference between databases and versions may be causing the different outcomes. If you were so kind to test that connection to the same database and version in our scenario, we'd appreciate it. Best regards.