Search Unity

MYSQL not working!

Discussion in 'Editor & General Support' started by unity_9QeI8F2Zm5dYXw, Jan 22, 2019.

  1. unity_9QeI8F2Zm5dYXw

    unity_9QeI8F2Zm5dYXw

    Joined:
    Jan 22, 2019
    Posts:
    17
    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.

    Code (CSharp):
    1. using MySql.Data.MySqlClient;
    2.  
    3.   public class example: MonoBehaviour {
    4.     MySqlConnection connection;
    5. }
    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
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,442