Search the Community
Showing results for tags 'owlgaming'.
-
I tried to use the Owl Gaming gamemode for my future server and when I finally looks like I could setting it up, I had a lot of Database errors (I'm using PHPMyAdmin from XAMPP) so I tried to fix them but I wasn't able to. I also tried to ask for help in their github and the RAGE Discord but the people can't give me a solution for this (but they could help me with other issues) so I'm trying now here. After installing and setting up a proper SSL connection with Windows in PHPMyAdmin (MariaDB) I still having this error: Authentication to host '127.0.0.1' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'@'localhost' (using password: YES) [ERROR] MySQL Connection Failed. Cannot Connect to Server. This is my database info from XAMPP This is the connection string and parameters from the project: MySQL.cs public bool Initialize(bool bIsStartup = true) { // TODO_GITHUB: You need to set the below environment variables / variables to your GAME database connection info string[] gameSettings = new string[] { SettingHelpers.GetDevEnvironmentSetting("GAME_DATABASE_IP") ?? "127.0.0.1", SettingHelpers.GetDevEnvironmentSetting("GAME_DATABASE_NAME") ?? "_gtav", SettingHelpers.GetDevEnvironmentSetting("GAME_DATABASE_USERNAME") ?? "root", SettingHelpers.GetDevEnvironmentSetting("GAME_DATABASE_PASSWORD") ?? "admin", SettingHelpers.GetDevEnvironmentSetting("GAME_DATABASE_PORT") ?? "3306" }; // TODO_GITHUB: You need to set the below environment variables / variables to your AUTH database connection info string[] authSettings = new string[] { SettingHelpers.GetDevEnvironmentSetting("AUTH_DATABASE_IP") ?? "127.0.0.1", SettingHelpers.GetDevEnvironmentSetting("AUTH_DATABASE_NAME") ?? "core", SettingHelpers.GetDevEnvironmentSetting("AUTH_DATABASE_USERNAME") ?? "root", SettingHelpers.GetDevEnvironmentSetting("AUTH_DATABASE_PASSWORD") ?? "admin", SettingHelpers.GetDevEnvironmentSetting("AUTH_DATABASE_PORT") ?? "3306" }; try { Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); m_Connection_Game = new MySqlConnection(Helpers.FormatString( "Server={0}; database={1}; UID={2}; password={3}; port={4}; ConnectionTimeout=10;", gameSettings)); m_Connection_Game.Open(); m_Connection_Auth = new MySqlConnection(Helpers.FormatString( "Server={0}; database={1}; UID={2}; password={3}; port={4}; ConnectionTimeout=10;", authSettings)); m_Connection_Auth.Open(); PrintLogger.LogMessage(ELogSeverity.HIGH, "MySQL Initialized"); return true; } catch (MySqlException ex) { switch (ex.Number) { // These are partially useless since MySQL tends to not throw these properly half the time case 0: PrintLogger.LogMessage(ELogSeverity.ERROR, "MySQL Connection Failed. Cannot Connect to Server."); break; case 1: PrintLogger.LogMessage(ELogSeverity.ERROR, "MySQL Connection Failed. Invalid username/password."); break; case 1042: PrintLogger.LogMessage(ELogSeverity.ERROR, "MySQL Connection Failed. Connection Timed Out."); break; ThreadedMySQL.cs public ThreadedMySQLConnection(int ID, string strIP, string strDatabaseName, string strUsername, string strPassword, string strPort) { m_ID = ID; m_strDatabaseName = strDatabaseName; m_connection = new MySqlConnection(Helpers.FormatString( "Server={0}; database={1}; UID={2}; password={3}; port={4}; ConnectionTimeout=10; Pooling=False;", strIP, strDatabaseName, strUsername, strPassword, strPort)); Connect(); // spawn thread #if !USE_SINGLE_THREADED_MYSQL m_Thread = new Thread(ThreadedTick); m_Thread.Name = Helpers.FormatString("[{1}] Threaded SQL Thread {0}", m_ID, strDatabaseName); m_Thread.Start(); #endif m_connection.StateChange += OnConnectionStateChange; } private static ThreadedMySQLConnectionPool m_ConnectionPool_Game = new ThreadedMySQLConnectionPool( #if USE_SINGLE_THREADED_MYSQL 1, #elif DEBUG Math.Min(4, Environment.ProcessorCount - 1), #else Environment.ProcessorCount - 1, // spawn hyperthreaded cores - 1 so we dont swamp / run on main thread (well only on the virtual core) #endif // TODO_GITHUB: You need to set the below environment variables / variables to your GAME database connection info SettingHelpers.GetDevEnvironmentSetting("GAME_DATABASE_IP") ?? "127.0.0.1", SettingHelpers.GetDevEnvironmentSetting("GAME_DATABASE_NAME") ?? "_gtav", SettingHelpers.GetDevEnvironmentSetting("GAME_DATABASE_USERNAME") ?? "root", SettingHelpers.GetDevEnvironmentSetting("GAME_DATABASE_PASSWORD") ?? "admin", SettingHelpers.GetDevEnvironmentSetting("GAME_DATABASE_PORT") ?? "3306" ); // Auth DB private static ThreadedMySQLConnectionPool m_ConnectionPool_Auth = new ThreadedMySQLConnectionPool( #if USE_SINGLE_THREADED_MYSQL 1, #elif DEBUG Math.Min(4, Environment.ProcessorCount - 1), #else Environment.ProcessorCount - 1, // spawn hyperthreaded cores - 1 so we dont swamp / run on main thread (well only on the virtual core) #endif // TODO_GITHUB: You need to set the below environment variables / variables to your AUTH database connection info SettingHelpers.GetDevEnvironmentSetting("AUTH_DATABASE_IP") ?? "127.0.0.1", SettingHelpers.GetDevEnvironmentSetting("AUTH_DATABASE_NAME") ?? "core", SettingHelpers.GetDevEnvironmentSetting("AUTH_DATABASE_USERNAME") ?? "root", SettingHelpers.GetDevEnvironmentSetting("AUTH_DATABASE_PASSWORD") ?? "admin", SettingHelpers.GetDevEnvironmentSetting("AUTH_DATABASE_PORT") ?? "3306" ); SerialDefinitionsServers (for the GetDevEnvironmentSetting, there is no "dev_settings.json" in the project so the file never exists and they should took the ??-right-side values, I wanna think) public static class SettingHelpers { public static string GetDevEnvironmentSetting(string strKey) { if (System.IO.File.Exists("dev_settings.json")) { Dictionary<string, string> dictSettings = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, string>>(System.IO.File.ReadAllText("dev_settings.json")); if (dictSettings.TryGetValue(strKey, out string strValue)) { return strValue; } else { return "null"; } } else { return Environment.GetEnvironmentVariable(strKey); } } } Even I tried to hardcore the parameters and the connection string and I still having the same error. At this point, I don't know what else do, I double check credentials, hardcode the connection string and their parameters, change the credentials, using several databases (MySQL or MariaDB withouth PHPMyAdmin) and I still don't being able to make a proper connection to the server.
-
Version 1.0.0
2330 downloads
This is the full gamemode & source code for the OwlGaming Grand Theft Auto V Roleplay server for RAGE:MP. Features include, but are not limited to: Account system, character creation, factions, gang tagging, vehicle systems, casino games, realistic inventory system, weapons systems, drugs systems, and much more! You can find the gamemode on GitHub- 4 comments
- 18 reviews
-
- 13
-