I am trying to connect my Unity multiplayer game with my MariaDB but i get the ERROR: MySqlException: Authentication method 'auth_gssapi_client' not supported by any of the available plugins. MySql.Data.MySqlClient.NativeDriver.Open () (at <13314bc2115d4bd2a5d896df29fb7179>:0) MySql.Data.MySqlClient.Driver.Open () (at <13314bc2115d4bd2a5d896df29fb7179>:0) MySql.Data.MySqlClient.Driver.Create (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) (at <13314bc2115d4bd2a5d896df29fb7179>:0)
this is my Database.cs
file:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using MySql.Data.MySqlClient;
using UnityEditor.Experimental.GraphView;
public class Database : MonoBehaviour
{
private string server;
private string database;
private string user;
private string password;
private string port;
public void Database_Initialize()
{
server = "IP-ADDRESS";
port = "PORT";
database = "DB_NAME";
user = "USERNAME";
password = "PASSWORD";
// Use interpolated strings to insert the values from variables
string connectionString = $"Server={server};Port={port};Database={database};Uid={user};Pwd={password};";
// Use "using" pattern to make sure everything is disposed
using (var connection = new MySqlConnection(connectionString))
{
connection.Open();
string query = "INSERT INTO user (Username) VALUES ('User1')";
using (MySqlCommand command = new(query, connection))
{
command.CommandTimeout = 60;
// Use ExecuteNonQuery to execute the INSERT.
// recordsChanged should be 1 afterwards
int recordsChanged = command.ExecuteNonQuery();
}
}
}
}
When i search for answers on the www, I only get something like: "edit the my.cnf
or my.ini
file" but I don't have one.
I downloaded my Conenctor on this website: https://dev.mysql.com/downloads/connector/net/ and just put the MySql.Data.dll in my Plugins folder. I tried using the .Net & Mono-, as well as the Microsoft Windoes-installation.
Both show the same error.
Any ideas? Thanks in advance!