All Questions
213 questions
0
votes
0
answers
565
views
C# MySQL Connector/Net 9.0.0 - Unable to connect to any of the specified MySQL hosts
I will need your advice here, because I am really stuck.
I am trying to connect to MySQL from my local computer to server (LAN).
MySQL Version is 8.0.39
Target framework is .NET 4.8
public bool ...
0
votes
2
answers
67
views
MySqlException: Cannot add or update a child row: a foreign_key constraint fails
I have this error:
MySqlException: Cannot add or update a child row: a foreign_key constraint fails
when executing this code:
INSERT INTO networks (owner_name, name, password, ip, visible)
VALUES ('...
0
votes
0
answers
68
views
Connect Timeout expired. Unable to connect to any of the specified MySQL hosts
I'm trying to deploy my api inside a docker container. It was working perfectly but I changed the mysql server parameters and it started giving me the following problem. Does anyone have any idea what ...
0
votes
2
answers
104
views
`MySqlDataReader.GetGuid` returns incorrect UUID
I generate UUIDs by using UUID_TO_BIN(UUID(), true) and storing them as BINARY(16).
However, when fetching the values:
var uuid = dataReader.GetGuid(name);
Console.WriteLine(uuid.ToString());
I do ...
1
vote
1
answer
433
views
MySql error, The given key was not present in the dictionary
I am getting the below exception while connecting to the database server.
Exception: An error occurred while executing the command definition. See the inner exception for details.
StackTrace: at ...
0
votes
0
answers
390
views
c# & mysql Exception when calling a long query
I have a code piece to run a stored procedure in mysql. Code runs and completes when execution time is under 1 hour however when it takes more than 1 hour it gets an exception. I set command timeout ...
0
votes
1
answer
78
views
MySqlConnector - Parameter in dynamic string query won't be set
@pName is the parameter set in C# code by:
using (MySqlCommand dynamicQueryCommand = new MySqlCommand(dynamicQueryWithParameter, conn))
{
dynamicQueryCommand.Parameters.Add("@pName", ...
0
votes
0
answers
62
views
C# ReplicationManager Error - ConfigurationErrorsException
I'm trying to connect to a MYSQL Database
Using the MysqlConnector plugin
https://www.nuget.org/packages/MySqlConnector/
var builder = new MySqlConnectionStringBuilder
{
Server = "127.0.0.1&...
0
votes
0
answers
1k
views
Cant connect to remote database with maui app from mobile device
I can't connect to my remote MySQL database with my MAUI application which I start from a mobile device.
But when I debug the application with "Windows Machine" everything is fine.
Can ...
0
votes
2
answers
326
views
Setting conn_attrs in MySqlConnection
I want to set the program name in the connection string. Seems like the way it should be set up is through the conn_attrs attribute in the MySql connection string. Here's the code:
var builder = new ...
0
votes
1
answer
225
views
Unable to connect to any of the specified MySQL hosts using SSH Tunnel
Connection.Open() Error: MySqlConnector.MySqlException: 'Unable to connect to any of the specified MySQL hosts.'
I've already tried multiples times with many codes here in Stack, but i still ...
0
votes
3
answers
919
views
How to run multiple data readers on single my sql connection
MySqlConnection con = GetConnection();
string sql = "SELECT COUNT(ID) FROM booking WHERE DATE(Booking_Date) = CURDATE()";
string sql2 = "SELECT SUM(Fare) FROM ...
0
votes
1
answer
1k
views
Does MySql Connector have a backwards compatibility?
I am working on a dotnet project. The thing is, we have two MySql servers for a development and test stage. The people who set up the servers didn't use the same version. Test is 8.0.12 and ...
-1
votes
1
answer
262
views
MySQL get value
Since yesterday I am trying to get this value (see image), I have tried to use "mysqlreader, executescalar and more", but I cannot get the number of lines.
What I want to do is this:
If the ...
0
votes
1
answer
98
views
How do i run a mysql app with mysql connector installed?
I made an C# app on visual studio, and this application works fine with MySQL Server.
But on other machines, even with the MySQL Connector Net installed, it does not connect to MySQL.
string ...