82 questions
2
votes
2
answers
266
views
Using MySQL.Data with C# while not making a MySql Connection for transactions
This question is similar to this one: Using MySql.Data with C# while not making a MySqlConnection
Basically, I can see in the documentation: https://dev.mysql.com/doc/connector-net/en/connector-net-...
0
votes
2
answers
320
views
.Net Core 8 Entity Framework (MySQL) DROP PROCEDURE IF EXISTS `MYSQL_BEFORE_DROP_PRIMARY_KEY` Error
I'm created a migration to add a few tables and update one table (add one column). The database is MySQL 8.0.31 and the EF provider is Oracle's MySql.EntityFrameworkCore
The migration was completed ...
1
vote
0
answers
751
views
Dapper async hangs
I updated Mysql.Data to use new mysql 8.* and since this update queryAsync hangs forever.
Here is my method:
public async Task<bool> IsLiveResultsEnabled(Guid clientId)
{
using (...
1
vote
1
answer
745
views
Cannot connect to MySql database after updating MySql.Data .NET package to a version newer than 8.0.27
I am using the MySql.Data package in a .NET Framework 4.7.2 application.
When updating MySql.Data to a version newer than 8.0.27, the database connection fails in a previously working project with no ...
1
vote
0
answers
413
views
C# Error while trying to connect to MySql using MySql.Data
ISSUE
While trying to connect to maria db using mysql.data i get this error:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Diagnostics.TraceInternal....
0
votes
1
answer
743
views
Package Installation Error In Microsoft Visual Studio 2019
Please I was busy for the past 4 days trying to fix the issues resulting from the below error. Please how do I go about fixing this error below?
*Severity Code Description Project File Line ...
3
votes
1
answer
2k
views
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 ...
0
votes
0
answers
112
views
Exception thrown when retrieving data from database when grouping
I'm trying to retrieve accounting periods from a MySql database using entity framework but keep running into an InvalidCastException exception.
This is the linq statement below:
var periodList = (from ...
0
votes
1
answer
122
views
How to identify transient errors in NET Standard 2.1 with MySql.Data.MySqlClient.MySqlException?
I'm writing my app with NET Standard 2.1 and MySql (NuGet pack MySql.Data).
The MySqlException doesn't have the property IsTransient so I can't recognize if the exception is temporary. How can I ...
0
votes
2
answers
320
views
Powershell and filenames with non-ASCII characters (e.g. Æ)
I am attempting to index my movie collection and in doing so have run across an issue where at least one title is skipped in the import phase due to special characters. The code skips over "Æon ...
1
vote
1
answer
92
views
Convert MySQL non-unicode characters in C#
I have a PHP application that currently stores data in MySQL tables in non-conventional format(I assume this is because it is using a non-unicode mysql connection).
Example, this is one of the ...
0
votes
0
answers
1k
views
I am struck with Error CS0246:The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
I am getting the error(Error CS0246:The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?). So I tried installing MySql.Data NuGet Package ...
1
vote
1
answer
4k
views
The handshake failed due to an unexpected packet format when updating MySql.Data 8.0.26 [duplicate]
I have a dependency on MySql.Data in my C# netcoreapp2.1 test project which I use to query for test data from a database, this works fine with v8.0.25, but if I upgrade to v.8.0.26 I get the following ...
0
votes
0
answers
1k
views
Getting SSL Connection Error on MySql.Data 8.0.26
So I've been using the MySql.Data from NuGet for a long time for connecting with my MariaDB databases in a lot of different .NET projects. It happens that now I'm starting a new .NET5 project and to ...
0
votes
2
answers
234
views
Installing MySQL.Data on Azure App Service deployment slot
What's the best way to install MySql.Data on azure app service?
We have a PHP application that requires some powershell scripts to be run in the background, these scripts must connect to the MySQL ...
1
vote
1
answer
2k
views
Could not load file or assembly MySql.Data, referencing two files in exception
Searched SO but can't find a solution that works.
In Visual I've got a main project. It uses another project (ProjectA) that compiles to a DLL. That project uses Servicestack ORMLite 4.5.14. I've also ...
0
votes
2
answers
1k
views
MySQL Parameters.AddWithValue not working C#
I have been trying my hand at writing the connecting code to connect with the database. It's been going pretty well, but I ran into a strange problem that I cant seem to fix.
When I try to add a ...
4
votes
1
answer
4k
views
AutoMapper MapFrom can't take null values [duplicate]
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 ...
1
vote
1
answer
688
views
EF core can't create Table, error in sql syntax
im new to Entity framework and i dont understand why it is giving me an error in sql syntax , i thought the whole purpose of using EFCore is to handle the sql syntax and abstract all the sql queries ...
0
votes
2
answers
481
views
MySqlDataReader.GetStream() throws IndexOutOfRangeException
So I'm using the MySql.Data package for my .NET Core project and store password hashes and salts (of type byte[]) as varbinary() to the database. When selecting the password hash and salt from a user ...
-1
votes
1
answer
306
views
Database reader closes before reading the data
I want to query my MySQL database by using the MySQL.Data connector. I know that I could use the Entity Framework or other handy tools similiar to ORMs e.g. Dapper. But I would like to try out the &...
0
votes
0
answers
234
views
MySqlException: Unable to connect to any of the specified MySQL hosts. MySql.Data.MySqlClient.NativeDriver.Open()
Here is the code that connects to MySql and attemps to query data, and these are the errors i'm getting:
An unhandled exception occurred while processing the request.
MySqlException: Timeout ...
0
votes
0
answers
117
views
C# WPF App - Exception on closing application
I have a problem with exception appearing while closing my WPF application.
HResult=0x80131515
Message=The Read method cannot be called when another read operation is pending.
Source=System
...
0
votes
1
answer
124
views
not able fetch Data from a database using MySqlClient in VB and Public Async Variables are inaccessable
This the code i have written, at one point it displayed System.Data.Dataset return in Access level but it wasn't what i was looking for.
Username is a string, Password is also a string and Access ...
1
vote
0
answers
360
views
MySQL (ADO.NET) Giving 'No Database Selected' Error when database is indeed selected
Using ADO.NET with the MySql Connector (MySql.Data) driver, I open a new, non-pooled query (no initial catalog/database is specified in connection string) and issue the following query:
ALTER TABLE `...
-1
votes
1
answer
254
views
Using MySql.Data with C# while not making a MySqlConnection
The reccomended way to use MySql.Data is to NOT use a MySqlConnection object; as explained in the documentation. This allows for the MySQl.Data API code to handle connection pooling correctly.
See: ...
1
vote
1
answer
726
views
MySql.Data can't connect to AWS Aurora
I have a really weird connection problem between C# .net core and AWS Aurora Serverless (MySql). I have a really simple web API that I'm using for testing. One of my endpoints is really simple to ...
5
votes
6
answers
8k
views
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) ...
0
votes
1
answer
155
views
MySql.Data.MySqlClient shows confusing error
I'm using VS2019 and today I opened my project to continue working but a strange error occured that I really don't understand. The MySql.Data.MySqlClient namespace shows this:
and every mysql commands ...
0
votes
3
answers
120
views
Unable to return string from while function
I'm trying to parse data from MariaDB MySQL database, but I have a problem when I try to return CODE. The public static string given below works perfectly, I just want to use parsed data in another ...
0
votes
1
answer
48
views
How do i get all columns / rows from my Database [VB.Net/MariaDB]
I am trying to get all results with the MySQL.Data Nuget because I am using MariaDB. But my Method just provides the first entry in my DB and does nothing more.
Public Function getAllFields(ByVal sql ...
0
votes
1
answer
120
views
MySqlParameter with float value of 0.0
I constructed a MySqlParameter with MySqlParameter tmp1 = new MySqlParameter("?tmp1", 0.0); and when executing the corresponding insert query received the error message that the respective column ...
1
vote
2
answers
856
views
VS 2017 MySql.Data manifest does not match the assembly reference
I've had some problems following migration of a software project to a new machine. I'm trying to get VS2017, MySql.data and my MySQL database working together. I get a long error message (below) ...
0
votes
1
answer
354
views
How can I check if something exist in MySQL database with int, or is there any alternatives?
I'm trying to check if the user's HWID already exists in my 'users' table in mysql database when trying to login. And if it does exist, make another check. However I'm getting error called "You have ...
1
vote
1
answer
4k
views
How to use Hangfire.MysqlStorage with .net core with MySql.Data?
I'm trying to use Hangfire with MysqlStorage in Asp.Net core project. With Hangfire.MysqlStorage 2.0 package, MysqlConnector is installed. I'm facing lot of problems with MysqlConnector and it is not ...
1
vote
1
answer
18k
views
Create MySql database with TEXT column
I'm creating MySql database table from C# desktop application on remote server. I would like to make long records for columns content. I guess TEXT type must be suitable for this, but I'm not sure, ...
2
votes
0
answers
126
views
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%) ...
3
votes
2
answers
3k
views
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 ...
0
votes
0
answers
60
views
MySQL.data login error
Ok, so i want to make a loader, that injects a dll into a process based on hwid checked from a MySQL database, by modifing a sourcecode on the internet, however even though i type correct login ...
0
votes
0
answers
1k
views
WEB API not working while sending GET request
I have created a WEB-API. It was working well on my local and on my server. But now when I try to send the request it is giving me below error.
{
"Message": "An error has occurred.",
"...
-1
votes
1
answer
726
views
Unable to connect to any of the specified MySQL hosts in WPF
I can't figure out what's wrong with the connection string. I tried all possible variations of the string. It's done in a WPF framework in vs 2015. I just installed SQL server 2016 newly.
The code is:
...
0
votes
0
answers
115
views
Xml in Insert causing Fatal error of '?xml' must be defined
While running through 3rd party NuGet Package called DbUp
INSERT INTO `portalquery`
VALUES
(31,'update portal.Config_PropertyValues set value = \''<?xml version=\"1.0\" encoding=\"utf-8\" ?>\...
-1
votes
1
answer
49
views
SQL C#: Nothing gets returned from Result.Read()
When I use this code, I get null returned. But when I am trying to use the query by sql I get normal result.
Here is my code:
public byte[] GetInfo(UnturnedPlayer player , string vehiclename)
...
102
votes
2
answers
90k
views
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.”
...
0
votes
0
answers
296
views
Source: MySql.Data.Entity.EF6 Index was outside the bounds of the array
Source: MySql.Data.Entity.EF6 stored procedure generate error Index was outside the bounds of the array.
List<PayRollAllocationList> payroll = db.SP_EmployeePayRoll(orgCode, Medicalallowcode, ...
0
votes
2
answers
3k
views
Change MySql.data version in Global Assembly Cache (GAC)
So I have previously developed a payroll system using c# way back 2010, and I decided to use it again as a reference, I had its ClickOne Application Deployment Manifest, but when I tried to run it an ...
0
votes
1
answer
886
views
Visual Studio 2015 not installing Mysql.data in NuGet
UWP App not being able to work with MySql
I have made an app in UWP and instead of using SQLLite which seems to be the norm for Visual Studio 2015 I want to use MySql. I have already connected my ...
0
votes
2
answers
3k
views
Could not load file or assembly MySql.Data
I've installed the MySQL for Visual Studio and the .NET Connector (6.8.3.0).
I previous had the 6.7.4.0 installed. Why is it still looking for this DLL?
I get the error message form event viewer:
...
1
vote
1
answer
3k
views
Ignore assembly .dll in same folder as executable
I have a .NET application that crashes if I have the MySql.Data.dll assembly in the same folder as the executable but works fine if I move it. A different executable in the same folder is dependent on ...
2
votes
1
answer
499
views
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 ...