27.08.2014, 20:45
hi guys i connect my server to mysql and uplode the files in myphpadmin but i have 1 problem in server logs say connection faield
and mysql username/password/database is true
this is Pawno Mysql codes
and mysql username/password/database is true
this is Pawno Mysql codes
Код:
forward ConnectMySQL(); public ConnectMySQL() { GTADM=mysql_connect("127.0.0.1","port_8008", "port_8008", "******"); //example GTADM=mysql_connect("127.0.0.1","gtaserver4279", "gtaserver4279", "maybefuckoff"); printf("%d",mysql_errno(GTADM)); if(mysql_errno() != 0) { mysql_close(GTADM); printf("[MYSQL]: [ERROR]:first Connection to `DATABASE` failed!"); GTADM=mysql_connect("127.0.0.1","port_8008", "port_8008", "*****"); //example GTADM=mysql_connect("127.0.0.1","gtaserver4279", "gtaserver4279", "maybefuckoff"); printf("%d",mysql_errno(GTADM)); if(mysql_errno() != 0) { mysql_close(GTADM); 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",GTADM); con=2; } } else { //mysql_log(LOG_ERROR | LOG_WARNING | LOG_DEBUG); printf("[MYSQL]:first Connection to `DATABASE` successful! || %d",GTADM); con=1; } return 1; }