05.10.2012, 16:28
(
Последний раз редактировалось tsonn1; 05.10.2012 в 17:59.
)
Hi!
I've got a little problem with mysql. I'm using the mysql plugin R6.
Here's the server log:
See - The server just keeps restarting. (I removed a couple of lines)
(Don't mind the times. I translated the text, so everything is 20:38:30. )
Here's the thing causing this:
About the host: OS - Debian 5
I've got a little problem with mysql. I'm using the mysql plugin R6.
Here's the server log:
Код:
---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3e, ©2005-2012 SA-MP Team [20:38:28] [20:38:28] Server Plugins [20:38:28] -------------- [20:38:28] Loading plugin: mysql.so [20:38:28] > MySQL plugin R6 successfully loaded. [20:38:28] Loaded. [20:38:28] Loading plugin: sscanf.so [20:38:28] [20:38:28] =============================== [20:38:28] sscanf plugin loaded. [20:38:28] © 2009 Alex "******" Cole [20:38:28] 0.3d-R2 500 Players "dnee" [20:38:28] =============================== [20:38:28] Loaded. [20:38:28] Loading plugin: streamer.so [20:38:28] *** Streamer Plugin v2.6.1 by Incognito loaded *** [20:38:28] Loaded. [20:38:28] Loaded 3 plugins. [20:38:28] [20:38:28] Filterscripts [20:38:28] --------------- [20:38:28] Loading filterscript 'Raadio.amx'... [20:38:28] Unable to load filterscript 'Raadio.amx'. [20:38:28] Loaded 0 filterscripts. [20:38:28] MYSQL: Trying to connect to server... [20:38:28] MYSQL: Error. Trying again... [20:38:28] MYSQL: Couldn't connect to server. [20:38:28] Gameode - On [20:38:28] _____________________________ [20:38:28] 162 cars loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 50 bikes loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 0 aCars loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 9 caravans loaded. (MySQL) [20:38:28] _____________________________ [20:38:29] 3 aHelis loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 14 boats loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 11 helis loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 39 bizzes loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 109 houses loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 5 points loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] Pickups limit = 400, Pickups loaded = 4 [20:38:30] [20:38:30] GM [20:38:30] _____________________________ [20:38:30] [20:38:30] Number of vehicle models: 103 [20:38:30] Bizzes updated, (2215) [20:38:30] Houses updated, (2276) [20:38:28] MYSQL: Trying to connect to server... [20:38:28] MYSQL: Error. Trying again... [20:38:28] MYSQL: Couldn't connect to server. [20:38:28] Gameode - On [20:38:28] _____________________________ [20:38:28] 162 cars loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 50 bikes loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 0 aCars loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 9 caravans loaded. (MySQL) [20:38:28] _____________________________ [20:38:29] 3 aHelis loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 14 boats loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 11 helis loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 39 bizzes loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 109 houses loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 5 points loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] Pickups limit = 400, Pickups loaded = 4 [20:38:30] [20:38:30] GM [20:38:30] _____________________________ [20:38:30] [20:38:30] Number of vehicle models: 103 [20:38:30] Bizzes updated, (2215) [20:38:30] Houses updated, (2276) [20:38:28] MYSQL: Trying to connect to server... [20:38:28] MYSQL: Error. Trying again... [20:38:28] MYSQL: Couldn't connect to server. [20:38:28] Gameode - On [20:38:28] _____________________________ [20:38:28] 162 cars loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 50 bikes loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 0 aCars loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 9 caravans loaded. (MySQL) [20:38:28] _____________________________ [20:38:29] 3 aHelis loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 14 boats loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 11 helis loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 39 bizzes loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 109 houses loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 5 points loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] Pickups limit = 400, Pickups loaded = 4 [20:38:30] [20:38:30] GM [20:38:30] _____________________________ [20:38:30] [20:38:30] Number of vehicle models: 103 [20:38:30] Bizzes updated, (2215) [20:38:30] Houses updated, (2276) [20:38:28] MYSQL: Trying to connect to server... [20:38:28] MYSQL: Error. Trying again... [20:38:28] MYSQL: Couldn't connect to server. [20:38:28] Gameode - On [20:38:28] _____________________________ [20:38:28] 162 cars loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 50 bikes loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 0 aCars loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 9 caravans loaded. (MySQL) [20:38:28] _____________________________ [20:38:29] 3 aHelis loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 14 boats loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 11 helis loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 39 bizzes loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 109 houses loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 5 points loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] Pickups limit = 400, Pickups loaded = 4 [20:38:30] [20:38:30] GM [20:38:30] _____________________________ [20:38:30] [20:38:30] Number of vehicle models: 103 [20:38:30] Bizzes updated, (2215) [20:38:30] Houses updated, (2276) [20:38:28] MYSQL: Trying to connect to server... [20:38:28] MYSQL: Error. Trying again... [20:38:28] MYSQL: Couldn't connect to server. [20:38:28] Gameode - On [20:38:28] _____________________________ [20:38:28] 162 cars loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 50 bikes loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 0 aCars loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 9 caravans loaded. (MySQL) [20:38:28] _____________________________ [20:38:29] 3 aHelis loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 14 boats loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 11 helis loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 39 bizzes loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 109 houses loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 5 points loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] Pickups limit = 400, Pickups loaded = 4 [20:38:30] [20:38:30] GM [20:38:30] _____________________________ [20:38:30] [20:38:30] Number of vehicle models: 103 [20:38:30] Bizzes updated, (2215) [20:38:30] Houses updated, (2276) [20:38:28] MYSQL: Trying to connect to server... [20:38:28] MYSQL: Error. Trying again... [20:38:28] MYSQL: Couldn't connect to server. [20:38:28] Gameode - On [20:38:28] _____________________________ [20:38:28] 162 cars loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 50 bikes loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 0 aCars loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 9 caravans loaded. (MySQL) [20:38:28] _____________________________ [20:38:29] 3 aHelis loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 14 boats loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 11 helis loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 39 bizzes loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 109 houses loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 5 points loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] Pickups limit = 400, Pickups loaded = 4 [20:38:30] [20:38:30] GM [20:38:30] _____________________________ [20:38:30] [20:38:30] Number of vehicle models: 103 [20:38:30] Bizzes updated, (2215) [20:38:30] Houses updated, (2276) [20:38:28] MYSQL: Trying to connect to server... [20:38:28] MYSQL: Error. Trying again... [20:38:28] MYSQL: Couldn't connect to server. [20:38:28] Gameode - On [20:38:28] _____________________________ [20:38:28] 162 cars loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 50 bikes loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 0 aCars loaded. (MySQL) [20:38:28] _____________________________ [20:38:28] 9 caravans loaded. (MySQL) [20:38:28] _____________________________ [20:38:29] 3 aHelis loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 14 boats loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 11 helis loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 39 bizzes loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 109 houses loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] 5 points loaded. (MySQL) [20:38:29] _____________________________ [20:38:29] Pickups limit = 400, Pickups loaded = 4 [20:38:30] [20:38:30] GM [20:38:30] _____________________________ [20:38:30] [20:38:30] Number of vehicle models: 103 [20:41:33] MYSQL: Connection dead. Reconnecting...
(Don't mind the times. I translated the text, so everything is 20:38:30. )
Here's the thing causing this:
pawn Код:
public MySQLConnect(sqlhost[], sqluser[], sqlpass[], sqldb[]) // by Luk0r
{
print("MYSQL: Trying to connect to server...");
mysql_connect(sqlhost, sqluser, sqldb, sqlpass);
if(mysql_ping()==0)
{
print("MYSQL: Connection successful.");
return 1;
}
else
{
print("MYSQL: Error. Trying again...");
mysql_connect(sqlhost, sqluser, sqldb, sqlpass);
if(mysql_ping()==0)
{
print("MYSQL: Reconnection success! Continuing normally.");
return 1;
}
else
{
print("MYSQL: Couldn't connect to server.");
return 0;
}
}
}
public MySQLDisconnect() // by Luk0r
{
mysql_close();
return 1;
}
public MySQLCheckConnection() // by Luk0r
{
if(mysql_ping()==0)
{
return 1;
}
else
{
print("MYSQL: Connection dead. Reconnecting...");
MySQLDisconnect();
MySQLConnect(MYSQL_HOST,MYSQL_USER,MYSQL_PASS,MYSQL_DB);
if(mysql_ping()==0)
{
print("MYSQL: Reconnection success! Continuing normally.");
return 1;
}
else
{
print("MYSQL: Couldn't connect to server.");
return 0;
}
}
}
About the host: OS - Debian 5