Can't connect to mysql host
#1

Well I can't connect to my host.
Is something wrong?

Код:
#define mysql_host             "s1.hostingtime.de"//the IP of the host, should be displayed when created a database
#define mysql_user             "db223"//database username
#define mysql_password         "secret :D"//database password
#define mysql_database         "db223"//database name
Код:
public OnFilterScriptInit()
{
	print("DutchAdmin System has loaded!");
 	mysql_debug(1);
	for(new x = 0; x < 3; x++)
	{
	    mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password);
	    if(mysql_ping() == -1) printf("MySQL connection attempt %d failed!", x);
	    else
		{
		    print("succes");
			break;
		}
	}
	format(Query,sizeof(Query), "CREATE TABLE IF NOT EXISTS `Users` ("\
              "`Username` varchar(24) NOT NULL,"\
              "`Password` varchar(64) NOT NULL,"\
              "`IP` varchar(16) NULL,"\
              "`Money` int(15) NULL,"\
              "`Score` int(15) NULL,"\
              "`Kills` int(15) NULL,"\
              "`Deaths` int(15) NULL,"\
              "`Viplevel` int(15) NULL,"\
              "`Adminlevel` int(15) NULL,"\
              "`Banned` int(15) NULL,"\
              "PRIMARY KEY (`Username`)"\
           );
    mysql_query(Query);
    mysql_free_result();
	return 1;
}
Reply


Messages In This Thread
Can't connect to mysql host - by Baboon - 29.09.2011, 17:28
Re: Can't connect to mysql host - by Salmon - 29.09.2011, 19:22
Re: Can't connect to mysql host - by Cyanide - 29.09.2011, 19:41
Re: Can't connect to mysql host - by Baboon - 30.09.2011, 13:19
Re: Can't connect to mysql host - by Raimis_R - 30.09.2011, 13:23
AW: Can't connect to mysql host - by Egon_Olsen - 25.07.2012, 17:11

Forum Jump:


Users browsing this thread: 1 Guest(s)