Error CS0246: The tpye or namespace name 'MySql' could not be found

Hi everyone,

As part of a project, I try to exchange data with a database. I followed a few tutorials / posts on the internet. Unfortunately for a few hours, I am stuck and don’t really understand the dysfunction. I explain to you :
-This is the error displayed in the unity editor :

-Here are the lines in my scripts :

using MySql.Data;
using MySql.Data.MySqlClient;

I don’t really understand why this doesn’t work, I added the MySql.Data reference to the project! But despite this, Unity always tells me that the reference is missing. Worse still, I launched my project this morning, the reference has completely disappeared … After the search, I saw that I added MySql.Data.dll to the Assets/ Plugins folder on Unity. So I did, and I added the reference by specifying the path of the .dll file to the Plugins folder. However, nothing changes, I always have the same problem and that is why I come to ask for your help.
Thx, I await your answers :smile:

No one to help me?

Ok, I solved the problem: The .net version that I installed is not supported by unity. I have installed connector 6.1.6, problem resolved after importing the new dll into the project.

1 Like

j’ai le même bug mais impossible de télécharger les versions ultérieur.

Can you please provide me the version of mysql you installed. Please share me the download link. Waiting for you reply.