Failed to connect for user 'root'@'localhost'
#5

pawn Код:
#include <a_samp>
#include <mysql>
#include <zcmd>

#define MySQL_hostname "localhost"
#define MySQL_username "root"
#define MySQL_password ""
#define MySQL_database "sanfierro"

main() {}

public OnGameModeInit()
{
    mysql_init();
    mysql_connect("127.0.0.1","root","sanfierro","");
    if(mysql_ping()) printf("MySQL connection to %s successful",MySQL_database);
    else printf("MySQL connection to %s failed",MySQL_database);
    return 1;
}

public OnGameModeExit()
{
    mysql_close();
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 7 Guest(s)