How can I create a mysql connection with my server. Maybe, can someone write a tutorial?
Thank you
How can I create a mysql connection with my server. Maybe, can someone write a tutorial?
Thank you
@Apple said in Mysql-Connection:
How can I create a mysql connection with my server. Maybe, can someone write a tutorial?
Thank you
You should be able to use any LUA based MySQL connection.
local reflection = clr.System.Reflection
local assembly = reflection.Assembly.LoadFrom('resources/database/lib/MySql.Data.dll')
local mysql = clr.MySql.Data.MySqlClient
local client = mysql.MySqlConnection("server=localhost;database=test;userid=root;password=")
client.Open()
local cmd = mysql.MySqlCommand("SELECT VERSION()", client)
print("MySQL Version:")
print(cmd.ExecuteScalar())
client.Close()
I tried use this code, and itβs work. But how can I use ExecuteReader in LUA for get array of data.