SA-MP Forums Archive
Help me. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help me. (/showthread.php?tid=656945)



Help me. - Libbyphay - 28.07.2018

I'm using Gamemode NGG v2, but i updated Mysql R40 for my gamemode.

PHP Code:
[MySQL] (Main PipelinesConnecting to 127.0.0.1...
[
MySQL] (MainPipelineFatal ErrorCould not connect to MySQLHost 127.0.0.1 DBtestgm Userroot
[MySQLNoteMake sure that you have provided the correct connection credentials.
[
MySQLError number: -
How to repair it?


Re: Help me. - JasonRiggs - 28.07.2018

You're using wrong information to login to the database.. Correct the information.


Re: Help me. - Libbyphay - 28.07.2018

Quote:
Originally Posted by JasonRiggs
View Post
You're using wrong information to login to the database.. Correct the information.
Where?


Re: Help me. - JasonRiggs - 28.07.2018

Inside your gamemode or a configuration file..


Re: Help me. - Libbyphay - 28.07.2018



Gamemode NGG is using mysql.cfg, and i changed it same.


Re: Help me. - Libbyphay - 28.07.2018

I changed
PHP Code:
if(mysql_errno(MainPipeline) != 0)
    {
        
printf("[MySQL] (MainPipeline) Fatal Error! Could not connect to MySQL: Host %s - DB: %s - User: %s"SQL_HOSTSQL_DBSQL_USER);
        print(
"[MySQL] Note: Make sure that you have provided the correct connection credentials.");
        
printf("[MySQL] Error number: %d"mysql_errno(MainPipeline));
        
SendRconCommand("exit");
    }
    else print(
"[MySQL] (MainPipeline) Connection successful toward MySQL Database Server!"); 
to:

PHP Code:
if(mysql_errno(MainPipeline) != -1)
    {
        
printf("[MySQL] (MainPipeline) Fatal Error! Could not connect to MySQL: Host %s - DB: %s - User: %s"SQL_HOSTSQL_DBSQL_USER);
        print(
"[MySQL] Note: Make sure that you have provided the correct connection credentials.");
        
printf("[MySQL] Error number: %d"mysql_errno(MainPipeline));
        
SendRconCommand("exit");
    }
    else print(
"[MySQL] (MainPipeline) Connection successful toward MySQL Database Server!"); 
and it working, i want reply real fine with it.