Connection mysql c # exception loading assembly MySql, Data


#1

Hello everyone
I am trying to make a connection with mysql through C #

I am using this mysql connector
https://dev.mysql.com/downloads/connector/net/

but I get this error on the console…
Exeception loading assemly MySql.Data: System.IO.FileNotFoundException: unable to find the specified file.

the dll compiles normally, it loads and executes the functions normally except when I’m going to use some mysql function (example: MySqlConnection) if I undo MySqlConnection the dll returns to normal operation

files
image


#2

console screenshot


#3

You cannot interact with a remote database via the client.

You will have to handle all MySQL interactions server side


#4

Wow, that’s right, I had not thought about it
thank you


#5

tentei pelo server, mais agora recebo estes erros
image

script directory
image


#6

I tested with the dll of the GHMattiMySQL ‘MySqlConnector.dll’, everything everything works normally, someone leaves to explain to me why?


#7

Some of the dependencies of MySql.Data.dll and the normal MySqlConnector are not in the mono alpine version that FiveM uses (For example TLS/SSL). At least for windows this is the case. Thus, GHMatti stripped down MySqlConnector so it works with FiveM.


#8

but I can not carry these dependencies?