20.11.2014, 11:37
Hellu.
My server isn't Connecting to MYSQL why?
Here are the Codes ,
My server isn't Connecting to MYSQL why?
Here are the Codes ,
pawn Код:
forward ConnectMySQL()
public ConnectMySQL()
{
eXs=mysql_connect("127.0.0.1","port_2473", "port_2473", "etc")
//example eXs=mysql_connect("127.0.0.1","gtaserver4279", "gtaserver4279", "maybefuckoff")
printf("%d",mysql_errno(eXs))
if(mysql_errno() == 0)
{
mysql_close(eXs)
printf("[MYSQL]: [ERROR]:first Connection to `DATABASE` failed!")
eXs=mysql_connect("127.0.0.1","your username here", "YOUR DATABASE NAME HERE", "YOUR PASSWORD of user here")
//example eXs=mysql_connect("127.0.0.1","gtaserver4279", "gtaserver4279", "maybefuckoff")
printf("%d",mysql_errno(eXs))
if(mysql_errno() == 0)
{
mysql_close(eXs)
printf("[MYSQL]: [ERROR]:Second Connection to `DATABASE` failed!")
}
else
{
//mysql_log(LOG_ERROR | LOG_WARNING | LOG_DEBUG)
printf("[MYSQL]:second Connection to `DATABASE` successful! || %d",eXs)
con=2
}
}
else
{
//mysql_log(LOG_ERROR | LOG_WARNING | LOG_DEBUG)
printf("[MYSQL]:first Connection to `DATABASE` successful! || %d",eXs)
con=1
}
return 1
}