mySQL error
#1

Greetings sa-mp,


Hello, well today I was trying to upload mySQL system in the host, but when I try to run the server (Server is on volt-host) the server close because I have this in my script:

pawn Код:
forward ConnectMySQL();
public ConnectMySQL()
{
    TuberiasMySQL =  mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);

    if(mysql_ping() == 1)
    {
        printf("[MYSQL]: Connection to `%s` succesful!", SQL_DB);
    }
    else
    {
        printf("[ERROR]: Connection to `%s` failed!", SQL_DB);
        [b]SendRconCommand("exit");[/b]
    }
    return 1;
}
Okay, thats not the point. The point is that in the my_sql_log just says:

Код:
[Tue Sep 10 10:59:18 2013] -------------------------
[Tue Sep 10 10:59:18 2013]      Logging Started
[Tue Sep 10 10:59:18 2013] -------------------------
And I don`t know why it says that because I have all my data in the right way!.


If anyone can help me,

Regards,
Pablo
Reply
#2

Are you sure ConnectMySQL() is called?
Try adding ConnectMySQL(); under OnGameModeInit.
Reply
#3

It was not in teh script, but when I go to the host console intated of say "[MSQL] Connection succesful!" I get this [MySQL] Thread running. Threadsafe: Yes.

Anyone know why?
Reply
#4

If you have the latest version, try this.
pawn Код:
public OnQueryError( errorid, error[], callback[], query[], connectionHandle )
{
       printf("ERRORID (%d), callback(%s) gives error:", errorid, callback);
       printf("ERROR STRING: '%s' for query '%s'", error, query);
       return 1;
}
Most likely this pinpoints the problem, so check it out! Sorry if it didn't help you.
Reply
#5

Still giving me the same [12:32:18] [MySQL] Thread running. Threadsafe: Yes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)