C#:
using System;
using System.Data;
using GTANetworkAPI;
using MySql.Data.MySqlClient;
namespace ServerSide
{
public class MySql : Script
{
private static MySqlConnection _connection;
private String _host { get; set; }
private String _user { get; set; }
private String _pass { get; set; }
private String _base { get; set; }
private MySql()
{
this._host = "localhost";
this._user = "root";
this._pass = "root";
this._base = "test";
}
public static void InitConnection()
{
MySql sql = new MySql();
String SqlConnection = $"SERVER={sql._host};PASSWORD={sql._pass};UID={sql._user};DATABASE={sql._base};";
_connection = new MySqlConnection(SqlConnection);
try
{
_connection.Open();
if (_connection.State == ConnectionState.Open)
{
NAPI.Util.ConsoleOutput("All things good!");
}
_connection.Close();
}
catch (Exception e)
{
NAPI.Util.ConsoleOutput("" + e);
}
}
}
}
при подключении такая ошибка:
Помогите исправить пожалуйста