Questions tagged [mysql.data]

MySql.Data is a fully-managed ADO.NET driver for MySQL.

MySql.Data is a fully-managed ADO.NET driver for MySQL. You can find more information on the official project page.

Installation

MySql.Data can most easily be installed through its NuGet package.

Install-Package MySql.Data
82 questions
102
votes
2 answers

MySql.Data.MySqlClient.MySqlException: “The host localhost does not support SSL connections.”

I use MySql.Data 8.08 and .NET Core to connect to MySql 5.7.18 but following exception is being thrown: MySql.Data.MySqlClient.MySqlException:“The host localhost does not support SSL connections.” How to deal with it?
Sea
  • 1,033
  • 2
  • 8
  • 5
11
votes
1 answer

Dapper is throwing an invalid cast exception when trying to set a boolean value returned from MySQL

I have this class public class User { public int UserId { get; set; } public string UserName { get; set; } public bool IsValidated { get; set; } } And I'm populating it with this sql using dapper: var users =…
Glenn Slaven
  • 33,720
  • 26
  • 113
  • 165
9
votes
4 answers

Unable to update EntityFramework models from MySQL database in Visual Studio 2015 RC

My organization upgraded from Visual Studio 2013 to Visual Studio 2015 RC a couple months ago, and we only just now attempted to update some of our existing "db-first" EntityFramework models from our MySQL database. When doing so, we received the…
8
votes
3 answers

[A]MySql.Data.MySqlClient.MySqlConnection cannot be cast to [B]MySql.Data.MySqlClient.MySqlConnection

I am getting this strange inexplicable error when I uploaded my application to a server for testing. From what I studied, it seems to be caused by conflicting MySql.Data, the copy I uploaded belongs to: 6.3.7.0. How could I solve this issue? I…
RicL
  • 533
  • 2
  • 6
  • 24
6
votes
1 answer

ADO.NET Entity Data Model forcecloses after "Choose Your Data Connection"

So I am trying to create my ADO Entity data model, and i cant seem to get past the "choose your data connection" page. I choose the correct connection, then click either no or yes for sensitive data, and i click next. However, nothing appears. …
5
votes
6 answers

Could not load file or assembly 'MySql.Data.EntityFramework, Version=8.0.19.0 or one of its dependencies

I have just installed the latest version of MySQL.Data.EntityFramework Version 8.0.19. The first time I run the code I got the following error: The latest nuget package (MySql.Data 8.0.19) contains an unsigned version of Ubiety.Dns.Core.dll.…
Hooman Bahreini
  • 14,480
  • 11
  • 70
  • 137
4
votes
1 answer

Why does opening a connection throw a distributed transactions error in MySQL? (.NET Connector)

I'm opening a connection to a local MySQL server and on the connection.Open() method it throws this error: System.NotSupportedException: MySQL Connector/Net does not currently support distributed transactions. at…
Glenn Slaven
  • 33,720
  • 26
  • 113
  • 165
4
votes
1 answer

AutoMapper MapFrom can't take null values

I have a column session_expires_at in my person database table. This column is of type DATETIME and is nullable. In my code my User object represents this column with public DateTime? SessionExpiresAt { get; set; } When reading the user from the…
Question3r
  • 2,166
  • 19
  • 100
  • 200
4
votes
3 answers

Downloading a large table of data from a MySQL Database to text file in C#

I have a MySQL database "DB" in which there's a table "TABLE" of a single field and it contains about 8 Million rows. I am trying to download that table into a text file as follows: //Open connection. connection.Open(); //Create…
Pi_
  • 2,010
  • 5
  • 22
  • 24
3
votes
2 answers

Microsoft.EntityFrameworkCore 2.1-rc with MySql.Data.EntityFrameworkCore

I'm trying to use mysql with Microsoft.EntityFrameworkCore 2.1-rc-final and MySql.Data.EntityFrameworkCore 8.0.11 as provider. But when I'm trying to execute the mugrations command i get this exception: System.MissingMethodException: Method not…
3
votes
1 answer

MySQL DbConnection

I'm getting a set of errors that I don't know how to reconcile. I'm using EntityFramework5 as that is the latest supported version of EF for MySql.Data & MySql.Data.Entity. It is App.Config that is throwing the errors. Here are the two alternations…
Recursor
  • 542
  • 5
  • 18
2
votes
1 answer

MySql.Data.MySqlClient.MySqlProviderServices.GetDbProviderManifestToken to access method MySql.Data.MySqlClient.MySqlConnection.get_Settings() failed

To Upgrade Database: MySql Version 5.5.62 to 8.0.28 .NET Framework: Version 4.5 to 4.8 Entity Framework: Version 5.0.0 to 6.4.4 I followed the steps: Uninstall and remove all existing mySQL dll of my project Uninstall Existing MySql…
2
votes
0 answers

High CPU Usage for MySql.Data.MySqlClient.CharSetMap GetEncoding

I have an API (ASPNET Core) which calls a Database (MySQL). I use NHibernate and the MySqlData connector. When a lot of requests are sent to my API, I come accross some CPU problem (near to 100%) that lead to HTTP request errors. I made a dump to…
2
votes
1 answer

Diffrence between using `MySql.Data` and `MySql.Data.MySqlClient`

I am trying to connect to a MariaDB server using the MySql.Data.dll. I think it should work since MariaDB is a drop-in replacement for MySQL. Found a helpful answer here on StackOverflow, however there is one thing that confuses me. At the very top…
Mihai
  • 2,807
  • 4
  • 28
  • 53
2
votes
2 answers

Fatal error encounterd when using MySqlDataReader

I'm getting the following error at my C# WinForms application: fatal error encountered during data read I'm using mysql.data V4.0.30319. Here's my code: int catCount = 1; while (catCount < 13) { MySqlConnection con = new…
Mathlight
  • 6,436
  • 17
  • 62
  • 107
1
2 3 4 5 6