SammyD86 0 Posted July 15 Hi , I'm trying a mysql connection for my server, but it stops and shuts down as soon as the event is called. What could this be? does anyone know advice? Is the database configuration so correct? I use the bridge server c # and client js on Server c# [RemoteEvent("register2")] public void Register2(Client player, string username, string password) { Databasesql.Query($"INSERT INTO Playerdata(Username,Password) VALUES ('{username}','{password}')"); } and the database config c# public static class Databasesql { public static string myConnectionString = "SERVER=localhost;Database=gtav;UID=gta;PASSWORD=gtatest;"; public static long Query(string Query) { using (var conn = new MySqlConnection(myConnectionString)) { try { conn.Open(); var cmd = conn.CreateCommand(); cmd.CommandText = Query; cmd.ExecuteNonQuery(); conn.Close(); return cmd.LastInsertedId; } catch (MySqlException ex) { NAPI.Util.ConsoleOutput($"[Database][Error] {ex.Message}"); return -1; } } } Share this post Link to post Share on other sites