Bug #94759 MySql.Data, MySqlConnection, Unhandled Exception
Submitted: 23 Mar 2019 7:16 Modified: 25 Mar 2019 6:39
Reporter: Khalid Meyssam Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:8 OS:Windows (10)
Assigned to: CPU Architecture:x86

[23 Mar 2019 7:16] Khalid Meyssam
Description:
I have tried the following code to connect to my database;

            MySqlConnectionStringBuilder constb = new MySqlConnectionStringBuilder();
            constb.Server = "db4free.net";
            constb.Port = 3306;
            constb.Database = "tsatmtest1";
            constb.UserID = "tsauser1";
            constb.Password = "Sami1234";
            constb.CharacterSet = "utf8";
            var consbst = constb.ToString();
            MySqlConnection conn1 = new MySqlConnection(consbst);
            if (conn1.State == ConnectionState.Open)
                {
                    conn1.Close();
                }
            conn1.Open();
                    if (conn1.State == ConnectionState.Open)
                    {
                        FindViewById<TextView>(Resource.Id.sndctx12).Text = "Connected";
                    }
                }

it returns "System.TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.Replication.ReplicationManager'"

I tried this on another mysql database and got the same error.
Please let me know what I shall do.
Regards

How to repeat:
Unhandled Exception:

System.TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.Replication.ReplicationManager' threw an exception. occurred
[25 Mar 2019 6:39] MySQL Verification Team
Hello Khalid Meyssam,

Thank you for the report.
Imho this is duplicate of Bug #89595, please see Bug #89595

regards,
Umesh