ZurionTV Posted January 12, 2020 Posted January 12, 2020 Hey leute, vielleicht könnt ihr mir ja helfen, Ich hatte mir überlegt WiredPlayers-RP umzubasteln und als ich alles eingetippt habe wie verlangt kam dieser Error: -> Error starting 'WiredPlayers' System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> MySql.Data.MySqlClient.MySqlException: Authentication to host '' for user '' using method 'mysql_native_password' failed with message: Access denied for user ''@'192.168.178.24' (using password: NO) ---> MySql.Data.MySqlClient.MySqlException: Access denied for user ''@'192.168.178.24' (using password: NO) at MySqlPacket MySql.Data.MySqlClient.MySqlStream.ReadPacket() at MySqlPacket MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket() --- End of inner exception stack trace --- at void MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.AuthenticationFailed(Exception ex) at MySqlPacket MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket() at void MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.Authenticate(bool reset) at void MySql.Data.MySqlClient.NativeDriver.Open() at void MySql.Data.MySqlClient.Driver.Open() at Driver MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) at Driver MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() at Driver MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() at Driver MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() at Driver MySql.Data.MySqlClient.MySqlPool.GetConnection() at void MySql.Data.MySqlClient.MySqlConnection.Open() at List<BusinessModel> WiredPlayers.database.Database.LoadAllBusiness() in C:\Users\Zuri\Desktop\WiredPlayers-RP-master\bridge\resources\WiredPlayers\database\Database.cs:line 1218 at void WiredPlayers.business.Business.LoadDatabaseBusiness() in C:\Users\Zuri\Desktop\WiredPlayers-RP-master\bridge\resources\WiredPlayers\business\Business.cs:line 19 at void WiredPlayers.database.Database.OnResourceStart() in C:\Users\Zuri\Desktop\WiredPlayers-RP-master\bridge\resources\WiredPlayers\database\Database.cs:line 40 --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at GTANetworkInternals.ScriptingEngine.InvokeVoidMethod(String method, Object[] args) at System.Collections.Generic.List`1.ForEach(Action`1 action) at GTANetworkInternals.EventHandler.ParseEx(Event _event, ScriptingEngine engine, Object[] arguments) at System.Collections.Generic.List`1.ForEach(Action`1 action) at GTANetworkInternals.GameServer.StartResource(String resourceName, String parent) Alle Daten sind richtig eingegeben bzw. kontrolliert ob eine Verbindung bestehen kann.
XCRON Posted January 12, 2020 Posted January 12, 2020 at List<BusinessModel> WiredPlayers.database.Database.LoadAllBusiness() in C:\Users\Zuri\Desktop\WiredPlayers-RP-master\bridge\resources\WiredPlayers\database\Database.cs:line 1218 at void WiredPlayers.business.Business.LoadDatabaseBusiness() in C:\Users\Zuri\Desktop\WiredPlayers-RP-master\bridge\resources\WiredPlayers\business\Business.cs:line 19 at void WiredPlayers.database.Database.OnResourceStart() in C:\Users\Zuri\Desktop\WiredPlayers-RP-master\bridge\resources\WiredPlayers\database\Database.cs:line 40 Die entsprechenden Zeilen kontrolliert?
ZurionTV Posted January 12, 2020 Author Posted January 12, 2020 Das ist aus Database.cs Line 1218 public static List<BusinessModel> LoadAllBusiness() { List<BusinessModel> businessList = new List<BusinessModel>(); using (MySqlConnection connection = new MySqlConnection(connectionString)) { connection.Open(); MySqlCommand command = connection.CreateCommand(); command.CommandText = "SELECT * FROM business"; using (MySqlDataReader reader = command.ExecuteReader()) { while (reader.Read()) { BusinessModel business = new BusinessModel(); float posX = reader.GetFloat("posX"); float posY = reader.GetFloat("posY"); float posZ = reader.GetFloat("posZ"); business.id = reader.GetInt32("id"); business.type = reader.GetInt32("type"); business.ipl = reader.GetString("ipl"); business.name = reader.GetString("name"); business.position = new Vector3(posX, posY, posZ); business.dimension = reader.GetUInt32("dimension"); business.owner = reader.GetString("owner"); business.multiplier = reader.GetFloat("multiplier"); business.locked = reader.GetBoolean("locked"); businessList.Add(business); } } } return businessList; } Das ist aus Business.cs Line 19 public static List<BusinessModel> businessList; public void LoadDatabaseBusiness() { businessList = Database.LoadAllBusiness(); foreach (BusinessModel businessModel in businessList) { // We create the entrance TextLabel for each business businessModel.businessLabel = NAPI.TextLabel.CreateTextLabel(businessModel.name, businessModel.position, 30.0f, 0.75f, 4, new Color(255, 255, 255), false, businessModel.dimension); // We mark the blip in the map foreach (BusinessBlipModel blipModel in Constants.BUSINESS_BLIP_LIST) { if (blipModel.id == businessModel.id) { Blip businessBlip = NAPI.Blip.CreateBlip(businessModel.position); businessBlip.Name = businessModel.name; businessBlip.Sprite = (uint)blipModel.blip; businessBlip.ShortRange = true; break; } } } } und das aus Database.cs Line 40 businessClass.LoadDatabaseBusiness(); Verstehe trotzdem nicht was daran nen Fehler sein soll.
Recommended Posts