- Home /
Question by
syrka · Oct 15, 2011 at 10:28 PM ·
javascriptdatabasemysql
How to use mysql in unityscript
ok, i want connect to a mysql database, but the problem is, i didnt get it work.
i place the dll's in my "Plugins" folder and try this:
import MySql.Data;
import MySql.Data.MySqlClient;
result in:
The following assembly referenced from E:\1_Unity_Dateien\UnityProjecte\Photon_testAssets/1_meins/skripts/dbConn.js(1,8): BCE0021: Namespace 'MySql.Data' not found, maybe you forgot to add an assembly reference?
Assets/1_meins/skripts/dbConn.js(2,8): BCE0021: Namespace 'MySql.Data.MySqlClient' not found, maybe you forgot to add an assembly reference?
Even this tutorial didn't work for me:
Assets/MySQLJS.js(52,23): BCE0005: Unknown identifier: 'MySql'
Do anyone know the magic?
edit: i use the "mysql-connector-net-6.4.4" package.
Comment
yep, but it didn't even work in editor.
the same lines in c# produce no error:
using UnityEngine;
using System.Collections;
using $$anonymous$$ySql.Data;
using $$anonymous$$ySql.Data.$$anonymous$$ySqlClient;
Your answer
![](https://koobas.hobune.stream/wayback/20220613011427im_/https://answers.unity.com/themes/thub/images/avi.jpg)