02.02.2015, 08:58
Hi !
i have big problem in mysql server !
I test some game mode with mysql systems but when i run samp-server i don't give any print from mysql
for example connect to mysql Or cannot connect to mysql
I set Host to 127.0.0.1 set my DB name user is root and don't have password
It means i don't some think to say i have mysql
sorry for Bad English . please help me
_____example____
#include <a_samp>
#include <a_mysql>
#define sqluser "root"
#define sqlpass ""
#define sqldb "accounts"
#define sqlhost "127.0.0.1"
new handle;
public OnGameModeInit()
{
handle = mysql_connect(sqlhost, sqldb, sqluser, sqlpass);
if(handle)
{
printf("[MYSQL]: Connection to `%s` succesful!", sqldb);
}
else
{
printf("[MYSQL]: [ERROR]: Connection to `%s` failed!", sqldb);
}
return 1;
}
public OnGameModeExit()
{
mysql_close();
return 1;
}
________
my xamp is run port 80 - 443 - 3306 and my samp port is 7777
_____
now it's my server_log
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3z, ©2005-2014 SA-MP Team
[10:49:55] filterscripts = "" (string)
[10:49:55]
[10:49:55] Server Plugins
[10:49:55] --------------
[10:49:55] Loaded 0 plugins.
[10:49:55]
[10:49:55] Filterscripts
[10:49:55] ---------------
[10:49:55] Loaded 0 filterscripts.
[10:49:55] Script[gamemodes/test.amx]: Run time error 19: "File or function is not found"
[10:49:55] Number of vehicle models: 0
i have big problem in mysql server !
I test some game mode with mysql systems but when i run samp-server i don't give any print from mysql
for example connect to mysql Or cannot connect to mysql
I set Host to 127.0.0.1 set my DB name user is root and don't have password
It means i don't some think to say i have mysql
sorry for Bad English . please help me
_____example____
#include <a_samp>
#include <a_mysql>
#define sqluser "root"
#define sqlpass ""
#define sqldb "accounts"
#define sqlhost "127.0.0.1"
new handle;
public OnGameModeInit()
{
handle = mysql_connect(sqlhost, sqldb, sqluser, sqlpass);
if(handle)
{
printf("[MYSQL]: Connection to `%s` succesful!", sqldb);
}
else
{
printf("[MYSQL]: [ERROR]: Connection to `%s` failed!", sqldb);
}
return 1;
}
public OnGameModeExit()
{
mysql_close();
return 1;
}
________
my xamp is run port 80 - 443 - 3306 and my samp port is 7777
_____
now it's my server_log
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3z, ©2005-2014 SA-MP Team
[10:49:55] filterscripts = "" (string)
[10:49:55]
[10:49:55] Server Plugins
[10:49:55] --------------
[10:49:55] Loaded 0 plugins.
[10:49:55]
[10:49:55] Filterscripts
[10:49:55] ---------------
[10:49:55] Loaded 0 filterscripts.
[10:49:55] Script[gamemodes/test.amx]: Run time error 19: "File or function is not found"
[10:49:55] Number of vehicle models: 0