10.11.2011, 21:31
Cool, but the mysql_connect(host, user, database, password) is not returning correctly...
The error message I made is not showing up even though I closed mysql... It keeps saying successful no matter what.
My Code:
server_log.txt
debug.txt
The error message I made is not showing up even though I closed mysql... It keeps saying successful no matter what.
My Code:
pawn Код:
if(!mysql_connect(MySQL_Host, MySQL_User, MySQL_Database, MySQL_Password)) {
print("[Server]: Couldn't connect to the MySQL database!");
print("[Server]: MySQL Information:");
printf("[Server]: Host: %s", MySQL_Host);
printf("[Server]: User: %s", MySQL_User);
printf("[Server]: Password: %s", MySQL_Password);
printf("[Server]: Database: %s", MySQL_Database);
print("[Server]: This information provided is most likely incorrect, please fix it.");
print("//==========================================================================");
SendRconCommand("exit");
} else {
print("[Server]: Connection to the MySQL database successful!");
}
Код:
---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3c R5, ©2005-2011 SA-MP Team [14:37:46] filterscripts = "" (string) [14:37:46] [14:37:46] Server Plugins [14:37:46] -------------- [14:37:46] Loading plugin: mysql [14:37:46] > MySQL plugin R6-2 successfully loaded. [14:37:46] Loaded. [14:37:46] Loading plugin: sscanf [14:37:46] [14:37:46] =============================== [14:37:46] sscanf plugin loaded. [14:37:46] © 2009 Alex "Y_Less" Cole [14:37:46] =============================== [14:37:46] Loaded. [14:37:46] Loading plugin: streamer [14:37:46] *** Streamer Plugin v2.5.2 by Incognito loaded *** [14:37:46] Loaded. [14:37:46] Loaded 3 plugins. [14:37:46] [14:37:46] Filter Scripts [14:37:46] --------------- [14:37:46] Loaded 0 filter scripts. [14:37:46] //-------------------------------------------------------------------------- [14:37:47] [Server]: Connection to the MySQL database successful! [14:37:47] //========================================================================== [14:37:47] Number of vehicle models: 0
Код:
[14:37:46] MySQL Debugging activated (11/10/11) [14:37:46] --------------------------- [14:37:46] [14:37:46] >> mysql_connect( ) [14:37:46] CMySQLHandler::CMySQLHandler() - constructor called. [14:37:46] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "server" | Username: "TheLazySloth" ... [14:37:47] CMySQLHandler::Connect() - Can't connect to MySQL server on 'localhost' (10061) (Error ID: 2003)