error connecting to my sql

hi i have written the following code

using UnityEngine; using MySql.Data.MySqlClient; using System; using System.Data; using System.Collections.Generic;

public class newSQLscript: MonoBehaviour {

private static MySqlConnection dbConnection;

public void Start () {

string connectionString = "left out for security reason" ;

 dbConnection = new MySqlConnection(connectionString);
    dbConnection.Open();
    Debug.Log("Connected to database.");

 //closeSqlConnection();

}

and it runs in the editor, however when i build and run it on iphone i get the following error:

Error building Player: SystemException: System.Net.Sockets are supported only on Unity iPhone Advanced. Referenced from assembly 'Mono.Data.Tds'. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun(

The answer is pretty simple: Unity iPhone Basic doesn’t support Sockets as you can see on the license comparison page. It’s in the “code” section. So this is not a bug, it’s a feature (which you haven’t bought).

I’m using sqlite instead of mysql for my ios project. That way I don’t have any references to net.sockets. Checkout this link for more info: blog post by Poya Manouchehri
I also had to remove all scripts using mysql from my project for the build.