MYSQL not working!

Hello guys.
I was wondering if anyone could help me.

I am attempting to use MYSQL inside unity I am using the below import but when I add
the connection var, the game stops working, everything crashes including my unity.

using MySql.Data.MySqlClient;

  public class example: MonoBehaviour {
    MySqlConnection connection;
}

I was wondering if someone has come across this before or knows of a fix to get MYSQL
working in unity.

I know all the risks etc…
I have a very specific use case where PHP or other methods are just not as efficent as straight up storing the data in unity and using c# unless you know anyway to take PHP objects and put them into C# objects

thank you for any help

could check if this works, and how

github has many unity mysql repositories too, can check how they do it.